Unsolved QWindowsWindow::setGeometry: Unable to set geometry 480x720+-2615+657
-
I have a form that when its displayed I get a message in the console. I've remove the code that was setting the geometry, cleaned and rebuilt but I'm still seeing this message displayed when the form is displayed:
QWindowsWindow:setGeometry: Unable to set geometry 480x720+-2615+657 on QWidgetWindow/'DataSetsClassWindow' .Resulting geometry: 480x720+-2615+657 (frame: 8, 31, 8, 8, custom margin: 0, 0, 0, 0, minimum size: 480x490, maximum size: 16777215x16777215).
The screen this is running on has the resolution: 5120x1140
-
That doesn't look right. Assuming the syntax is taken from X11 then +- is probably where your problem is. I think + and - are used separately to indicate offset from upper left and lower right screen limits.
HxW+x+y from upper left
HxW-x-y from lower right -
@Kent-Dorfman , that was taken from the console output so the output is as displayed.
-
@SPlatten
One thought: I am guessing that the-2615
is what it doesn't like.I've remove the code that was setting the geometry
Is there any chance that in time you will come back to this and say "Actually I just found I did not remove every geometry, there was one left"? Or, is there any chance you have previously saved the geometry and are trying to restore it (
QWidget::restoreGeometry()
)? -
@JonB , I've checked the source, I'm not calling setGeometry, there are no instances of QRect, no mention of geom in the class, searching with case insensitive.
-
@SPlatten
Then although you do not say what version of Qt you are using, a simple Google suggests you are on something like 5.12 and your issue is described in, say, https://stackoverflow.com/questions/54307407/why-am-i-getting-qwindowswindowsetgeometry-unable-to-set-geometry-warning-wit ? -
@JonB , the version of Qt is 5.9.2 MSVC2015 32bit, I'm not in a position to upgrade Qt either as I'm using a clients laptop and the IT is tightly controlled.
-
@SPlatten
Well, I suggest nonetheless you Google as there are quite a few hits going back over time. Just for example https://bugreports.qt.io/browse/QTBUG-58027 mentionsi met the same issue when i upgrade the version to qt5.9.2, my previous version is 5.7.
It seems to be a warning some people get. Some suggestions that setting a minimum size helps.