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

QWindowsWindow::setGeometry warning even on a simple program

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P3: Somewhat important
    • 5.10.0 Beta 3, 5.9.4
    • 5.9.2
    • GUI: Window management
    • None
    • Qt 5.9.2 with msvc2015_64.

    Description

      In 5.9.2, even a simpleĀ `QMessageBox` program may complain the following warnings:

      QWindowsWindow::setGeometry: Unable to set geometry 100x30+257+185 on QWidgetWindow/'QMessageBoxClassWindow'. Resulting geometry:  126x110+257+185 (frame: 8, 31, 8, 8, custom margin: 0, 0, 0, 0, minimum size: 126x110, maximum size: 126x110).
      

      Qt 5.7.1 and 5.9.1 do not have this issue.

      Example program:

      #include "widget.h"
      #include <QtWidgets>
      
      Widget::Widget(QWidget *parent)
          : QWidget(parent)
      {
          QMessageBox msgBox(QMessageBox::Information,
                             tr("Test"),
                             tr("Welcome!"),
                             QMessageBox::Ok,
                             this);
          msgBox.setInformativeText(tr("abc"));
          // msgBox.setMinimumSize(msgBox.minimumSizeHint());
          msgBox.exec();
      }
      
      Widget::~Widget()
      {
      
      }
      

      Uncomment the `setMinimumSize()` line will eliminate this warning.

      Attachments

        1. logging_messages.txt
          17 kB
        2. qtbug63661_diag.diff
          4 kB
        3. qtbug63661_log_510.txt
          2 kB
        4. qtbug63661_log_58.txt
          1 kB
        5. qtbug63661_log_59.txt
          2 kB
        6. qtbug63661.zip
          1 kB

        Issue Links

          For Gerrit Dashboard: QTBUG-63661
          # Subject Branch Project Status CR V

          Activity

            People

              dedietri Gabriel de Dietrich (drgvond)
              tamlok tamlok
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes