Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.15.1, 6.2.0
-
-
f7a4a79c62daeba9ab5545c5e0a1f36d5e1fce6b (qt/qtbase/dev) 22d74333732ba0d5a5b8fd94f2b539bba989298a (qt/qtbase/6.2) a2797c7ddbcf7b0942b871c145967e92df31bfad (qt/tqtc-qtbase/5.15)
Description
[Code]
#include <QComboBox> #include <QScroller> #include <QAbstractItemView> MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) { QComboBox *comboBox = new QComboBox(this); for (int i = 0; i < 60; i++) { comboBox->addItem(" item " + QString::number(i + 1)); } QScroller::grabGesture(comboBox->view(), QScroller::LeftMouseButtonGesture); }
[Steps]
1.Click the QComboBox component and scroll the mouse to hide a part of the item above;
2.At this moment, press the left mouse button and drag the QComboBoxListView down;
3.Release the left mouse button, QComboBoxListView will automatically return to position;
4.But the position has been misplaced, and there is a blank underneath;
5.On the contrary, if you drag upwards, there will be a blank space above.
[Hope]
I hope that there will be no blank space on the top or bottom after the scrolling is over