Details
-
Bug
-
Resolution: Out of scope
-
P3: Somewhat important
-
4.6.2
-
None
Description
When having a cell widget and increasing the column span, then the cell widget does not increase its size to span over the relevant columns. After resizing the toplevel window, the cell widget resizes correctly however. Calling update() or repaint() does not help.
This is reproducible with the example below (reproduced on Windows):
#include <QtGui> class TableWidget : public QTableWidget { Q_OBJECT public: TableWidget() { button1 = new QPushButton("Click me", this); setRowCount(1); setColumnCount(1); setCellWidget(0, 0, button1); connect(button1, SIGNAL(clicked()), this, SLOT(test1())); } public slots: void test1() { insertColumn(columnCount()); setSpan(0,0,1,columnCount()); } private: QPushButton *button1; }; #include "main.moc" int main(int argc, char** argv) { QApplication app(argc, argv); TableWidget window; window.show(); return app.exec(); }