Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.15.0
-
-
91a97187ac385c24344d1d062abe7c9d7611c1c4 (qt/qtbase/6.0) 9d36ee1904114a91a5c08b18ccfb72cd1d33d58f (qt/qtbase/dev) 3cd95e958c3d2d0418442a8539bcd7274ea04f48 (qt/tqtc-qtbase/tqtc/lts-5.15)
Description
The following code
#include <QApplication> #include <QTableWidget> #include <QPushButton> int main(int argc, char *argv[]) { QApplication a(argc, argv); QTableWidget table; table.setRowCount(2); table.setColumnCount(3); QPushButton button("Push me"); table.setCellWidget(1, 1, &button); table.show(); return a.exec(); }
generates an unwanted behavior when resizing the column or rows of the TableWidget:
- When the mousebutton is hold down during the resizing process, the widget is not resized: it remains unaffected by the changes
- Once the mousebutton is released the dimension of the widget are set to the correct ones.
- In the preceding versions of Qt the behavior was not like this. (see https://forum.qt.io/topic/116674/qtablewidget-with-qpushbutton-inside-resize-problem and https://stackoverflow.com/questions/62745274/qtablewidget-with-qpushbutton-inside-resize-problem?noredirect=1#comment111014280_62745274)
The same strange behavior is present using PySide2.
The same strange behavior happens if one sets a persistent editor containing a certain widget in a table view.