Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
5.15.2, 6.2.0 Beta4
-
None
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(); }