Details
-
Bug
-
Resolution: Done
-
P4: Low
-
4.5.1
-
None
-
10221602edb39b7c7ed9e0c9608f64a539adcdec
Description
The size grip will not be visible even if the user un-maximize the window.
#include <QtGui/QtGui>
int main(int argc, char *argv[]) {
QApplication app(argc,argv);
QMainWindow *main = new QMainWindow;
QStatusBar *statusbar = new QStatusBar;
statusbar->setSizeGripEnabled(true);
QLabel *label1 = new QLabel("Label 1 ...");
QLabel *label2 = new QLabel("Label 2 ...");
QLabel *label3 = new QLabel("Label 3 ...");
statusbar->addWidget(label1, 0);
statusbar->addWidget(label2, 0);
statusbar->addWidget(label3, 1);
main->setStatusBar(statusbar);
// main->show();
main->showMaximized();
return app.exec();
}
The reason is that in QSizeGripPrivate::init the top level window is not correctly set yet, so the eventFilter is not installedon the right widget.
Workaround is to create the statusbar with the main window as a parent.