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

[Reg 6.2.2 -> 6.9] Widget area partially frozen while scrolling

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.9.0
    • Widgets: Layout
    • None
    • Android

    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

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            jpo38 Jean Porcherot
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes