Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QWindowsWindow::setGeometry: Unable to set geometry



  • I have developed one QWebView application earlier using Qt4.8.1 SDk.
    Now I have recompiled my application using VS2012 Qt SDK 5.1 64 bit.
    I am getting the below mention error message in some of websites.

    QWindowsWindow::setGeometry: Unable to set geometry

    Please let me know what this error message represents and how to get rid out of it.



  • I'm in this boat too on PyQt5.

    Using a QBoxLayout causes the error for me. Would love to hear of a possible solution to this issue.

    Python 2.7.5, PyQt 5.1.1 compiled with Qt 5.1.1 msvc opengl on Windows 7 x64

    @class Window(QWidget):
    def init(self, parent=None):
    super(Window, self).init(parent)

        header = QWidget()
    
        layout = QBoxLayout(QBoxLayout.TopToBottom, self)
        layout.addWidget(header)
    

    if name == 'main':
    app = QApplication(sys.argv)

    win = Window()
    win.show()
    
    sys.exit(app.exec_())
    

    QWindowsWindow::setGeometry: Unable to set geometry 22x22+640+285 on 'WindowClassWindow'. Resulting geometry: 116x22+640+285 (frame: 8, 30, 8, 8, custom margin: 0, 0, 0, 0, minimum size: 22x22, maximum size: 16777215x16777215).@



  • I got this error/warning on Windows 8.1 and it seems to be just a matter of a limitation on the minimum size of the window (imposed by the OS or window manager) when it does not have enough space for the window title and/or standard GUI buttons.

    When I set a fixed width of 100 pixels I got the error, but setting its minimun to 200 seems enought to avoid the error.



  • I got this error/warning on Windows 8.1 and it seems to be just a matter of a limitation on the minimum size of the window (imposed by the OS or window manager) when it does not have enough space for the window title and/or standard GUI buttons.

    When I set a fixed width of 100 pixels I got the error, but setting its minimun to 200 seems enought to avoid the error.


Log in to reply