Why?
setGeometry: Unable to set geometry 22x22+320+145 on QWidgetWindow/\'WidgetClassWindow\'. Resulting geometry: 116x22+320+145 (frame: 8, 30, 8, 8, custo
Try to use: ajustSize()
Looks To be the problem: Why am I getting QWindowsWindow::setGeometry: Unable to set geometry warning with Qt 5.12.0
A possible solution: Qt Unable to set geometry
This warning happens (at least to me) when the size of the widget results to be very small.
Set a minimum size for your widget (so it will be automatically positioned), like:
// Widget constructor
QVBoxLayout* vLayout = new QVBoxLayout();
setLayout(vLayout);
setMinimumSize(200,200);
You should also parent your widget to a QMainWindow
, but will still work.