Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
6.0.0, 6.2.1
-
None
-
-
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
- is required for
-
QTCREATORBUG-26572 Text selection background has gaps between lines
-
- Closed
-