Details
-
Bug
-
Resolution: Duplicate
-
P2: Important
-
None
-
5.12.0
-
None
Description
Since I migrated from Qt 5.6.0 to Qt 5.12.0 I get tones of message reporting setGeometry failed. This is even reported for a very simple program opening a QDialog:
main.cpp:
#include <QApplication>
#include "mainframe.h"
#include <qDebug>
void MessageOutput( QtMsgType type, const QMessageLogContext &context, const QString &msg)
{
qDebug() << msg;
}
int main( int argc, char* argv[] )
{
QApplication app(argc, argv);
qInstallMessageHandler(MessageOutput);
MainFrame wnd;
wnd.show();return app.exec();
}
mainframe.h:
#include <QMainWindow>
class MainFrame : public QMainWindow
{
Q_OBJECT
public:
MainFrame();
public slots:
void showPopup();
};
mainframe.cpp:
#include "mainframe.h"
#include <QDialog>
#include <QLabel>
#include <QPushButton>
#include <QVBoxLayout>
MainFrame::MainFrame()
{
QPushButton* pTextButton = new QPushButton( "Show popup", this );
connect( pTextButton, SIGNAL(clicked()), this, SLOT(showPopup()) );
setCentralWidget( pTextButton );
}
void MainFrame::showPopup()
{
QDialog dlg( this );
dlg.setLayout( new QVBoxLayout() );
dlg.layout()->addWidget( new QLabel("popup message",&dlg) );
dlg.exec();
}
Under Windows 7, this reports warning:
QWindowsWindow::setGeometry: Unable to set geometry 132x30+682+303 on QWidgetWin
dow/'QDialogClassWindow'. Resulting geometry: 132x42+682+303 (frame: 4, 28, 4,
4, custom margin: 0, 0, 0, 0, minimum size: 116x42, maximum size: 16777215x16777
215).
Attachments
Issue Links
- duplicates
-
QTBUG-63661 QWindowsWindow::setGeometry warning even on a simple program
- Closed