Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.9.0
-
None
Description
Under Android (10), when scrolling a text view (but I experienced this with other kind of views), the left and top part of the view remains frozen while scrolling and is only repainted when scroll bar is released.
Sample code:
#include <QApplication> #include <QVBoxLayout> #include <QScrollArea> #include <QMainWindow> #include <QLabel> #include <QTextBrowser> int main(int argc, char* argv[]) { QApplication a(argc, argv); QMainWindow w; QWidget* centralWidget = new QWidget(&w); QVBoxLayout* pLayout = new QVBoxLayout(centralWidget); QTextBrowser* pText = new QTextBrowser(centralWidget); pText->setLineWrapMode(QTextBrowser::NoWrap); pText->setReadOnly(true); pText->setTextInteractionFlags(Qt::TextBrowserInteraction); pText->setOpenExternalLinks(false); pText->setOpenLinks(false); std::string res = ""; for (size_t pos = 0; pos != 500; ++pos) res += std::to_string(pos) + "dl========================ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd\n"; pText->insertPlainText(res.c_str()); pLayout->addWidget(new QLabel("Hello\nHello world\nFoo\nBar")); pLayout->addWidget(pText); w.setCentralWidget(centralWidget); w.show(); return a.exec(); }
See attached video to see how it looks like.
Note that if you remove the QLabel (`pLayout->addWidget(new QLabel("Hello\nHello world\nFoo\nBar"));`), it works much better.
The more lines the QLabel top contains, the biggest the top frozen area will be. It's as if the painting has a wierd offset.
I'm migrating my code from Qt 6.2.2, it used to work fine with this older version