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

WebAssembly: QScrolllArea always updates with refreshing the entire viewport

    XMLWordPrintable

Details

    • WebAssembly

    Description

      When moving the slider of vertical scrollbars,  the scrollview always perform fully update on the Webassembly platform.  While on Windows platform, widgets will receive paint events for the newly exposed parts。

       

      Sample Code:

      #include <QApplication>
      #include <QDebug>
      #include <QMainWindow>
      #include <QPaintEvent>
      #include <QPainter>
      #include <QScrollArea>
      
      class MyWidget : public QWidget
      {
      public:
          MyWidget() {}
      
          void paintEvent(QPaintEvent *event)
          {
              QPainter painter(this);
              painter.fillRect(event->rect(), Qt::white);
              qDebug() << event->rect();
          }
      };
      
      int main(int argc, char *argv[])
      {
          QApplication a(argc, argv);
      
          MyWidget *widget = new MyWidget();
          widget->resize(2000, 3000);
          QScrollArea *scrollArea = new QScrollArea();
          scrollArea->setWidget(widget);
      
          QMainWindow w;
          w.setCentralWidget(scrollArea);
          w.show();
          return a.exec();
      }
      

       

      Attachments

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

        Activity

          People

            aleksandr.reviakin Aleksandr Reviakin
            piggestbaby lei chen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes