Details
-
Bug
-
Resolution: Won't Do
-
P4: Low
-
None
-
5.0.1
-
None
-
Linux i5 3.7.6-1-ARCH #1 SMP PREEMPT Mon Feb 4 09:15:13 CET 2013 x86_64 GNU/Linux
Description
This code will show a fullscreen "dialog" under Qt4, but not under Qt5. The dialog will be fullscreen in Windows with either version of Qt.
#include <QApplication> #include <QtDeclarative> #include <QWidget> QWidget* subWidget; class MyWidget : public QWidget { public: MyWidget(QWidget* parent = 0) : QWidget(parent) { subWidget = new QWidget(this, Qt::FramelessWindowHint | Qt::Dialog); subWidget->show(); } void resizeEvent(QResizeEvent* event) { subWidget->setGeometry(QRect(pos(), event->size())); } }; ////////////////////////////////////////////////////////////////////////////// int main(int argc, char* argv[]) { QApplication app(argc, argv); QApplication::setAttribute(Qt::AA_NativeWindows); MyWidget widget; widget.setStyleSheet("background:\"red\""); widget.showFullScreen(); subWidget->setStyleSheet("background:\"green\""); subWidget->setAutoFillBackground(true); return app.exec(); }
Attachments
Issue Links
- relates to
-
QTBUG-54489 qt5 showFullScreen
- Closed