windows下QT出现setGeometry: Unable to set geometry

在windows下编译出现了下面这些警告,ubuntu下好像不会出现这个

setGeometry: Unable to set geometry 1080x1920+8+30 on QWidgetWindow/'CallnumberWindow'. Resulting geometry: 1080x750+8+30 (frame: 8, 30, 8, 8, custom margin: 0, 0, 0, 0, minimum size: 0x0, maximum size: 16777215x16777215).

我找了一堆,没有给我说出个所以然,后来我解决了,就是添加一行下面这样的代码

setWindowFlags(Qt::WindowCloseButtonHint | Qt::MSWindowsFixedSizeDialogHint);

I can confirm that this warning don't appear on Linux, with exactly the same code and with same Qt versions.

try to pass 'Qt::MSWindowsFixedSizeDialogHint' window flag to 'QInputDialog::getText' method, it should remove the warning.

你可能感兴趣的:(QT,setGeometry,Unable,to,set,geometry)