Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-98372

Regression Qt5 > Qt6: Visible gaps between selected lines

    XMLWordPrintable

Details

    • Windows
    • 793417ce75bef47dd42e16a6cf9bf081db4238a5 (qt/qtbase/dev) 150a897a8300177a5ef15192c0af91610459807c (qt/qtbase/6.2)

    Description

      The issue can be reproduced with the following example:

      #include <QApplication>
      #include <QPlainTextEdit>
      #include <QSpinBox>
      #include <QVBoxLayout>
      
      int main(int argc, char *argv[])
      {
          QApplication a(argc, argv);
      
          QWidget w;
          w.setLayout(new QVBoxLayout());
      
          QSpinBox sb;
          sb.setRange(1,10000);
          sb.setSuffix("%");
          sb.setSingleStep(10);
          sb.setValue(100);
          w.layout()->addWidget(&sb);
      
      
          QPlainTextEdit e;
          QFont font("Source Code Pro");
          constexpr int defaultPointSize = 12;
          font.setPointSize(defaultPointSize);
          e.setFont(font);
          e.setPlainText("foo\nbar\nfoo");
          w.layout()->addWidget(&e);
      
          QObject::connect(&sb, qOverload<int>(&QSpinBox::valueChanged), [&](int value) {
              font.setPointSize(qMax(1, int(defaultPointSize * value / 100.)));
              e.setFont(font);
              e.selectAll();
          });
      
          w.show();
      
          return a.exec();
      }
      

      With the following example I get gabs inbetweeen the selected lines like in QTCREATORBUG-26572. They are not visible in all zoom levels here but for example in 100% or in 400% see attached pictures. This is not reproducible with Qt 5.15.

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-98372
          # Subject Branch Project Status CR V

          Activity

            People

              esabraha Eskil Abrahamsen Blomfeldt
              davschul David Schulz
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes