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

Regression Qt5 > Qt6: Visible gaps between selected lines

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Done
    • Affects Version/s: 6.0.0, 6.2.1
    • Fix Version/s: 6.2.3, 6.3.0 Alpha
    • Component/s: GUI: Text handling
    • Labels:
      None
    • Platform/s:
      Windows
    • Commits:
      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

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

              Assignee:
              esabraha Eskil Abrahamsen Blomfeldt
              Reporter:
              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