Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-29646

regression: Dialog can't cover entire screen under Qt5, but can be under Qt4

    XMLWordPrintable

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

        1. snapshot1.png
          9 kB
          Janez Žemva
        2. trace-qt4
          240 kB
          Shawn Rutledge
        3. trace-qt5dev
          802 kB
          Shawn Rutledge

        Issue Links

          Activity

            People

              paeglis Gatis Paeglis
              janezzabc Janez Žemva
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: