-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
4.6.0, 5.6.1
-
None
-
Snow Leopard
-
-
e2d8c7bf2203cbc0c7ff923caf3132881aafa0b0
Running the sample form below shows how a QPushButton widget does not get drawn correctly on the Mac with the given construct.
Tested on cocoa, carbon and windows.
#include <QtGui> class Form : public QWidget { public: QGridLayout *gridLayout; QDockWidget *dockWidget; QWidget *dockWidgetContents; QVBoxLayout *verticalLayout; QPushButton *pushButton; Form() { this->resize(320, 276); gridLayout = new QGridLayout(this); gridLayout->setObjectName(QString::fromUtf8("gridLayout")); dockWidget = new QDockWidget(this); dockWidget->setObjectName(QString::fromUtf8("dockWidget")); //set floating makes this a tool type window, this seems to be related. dockWidget->setFloating(true); dockWidgetContents = new QWidget(); dockWidgetContents->setObjectName(QString::fromUtf8("dockWidgetContents")); verticalLayout = new QVBoxLayout(dockWidgetContents); verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); pushButton = new QPushButton("PushButton",dockWidgetContents); pushButton->setObjectName(QString::fromUtf8("pushButton")); verticalLayout->addWidget(pushButton); dockWidget->setWidget(dockWidgetContents); gridLayout->addWidget(dockWidget, 0, 0, 1, 1); } }; int main (int argc, char *argv[]) { QApplication app(argc, argv); Form form; form.show(); return app.exec(); }