[SOLVED] QWindowsWindow::setGeometry - Unable to set geometry
-
Hi guys,
I'm wondering if anyone experienced this error before.
It happened when I was changing my UI.
I tried to revert back but still got it, my App crashes with this error :@QWindowsWindow::setGeometry: Unable to set geometry 1920x400425+0+22 on QWidgetWindow/'MainWindowWindow'. Resulting geometry: 1920x65497+0+22 (frame: 8, 30, 8, 8, custom margin: 0, 0, 0, 0, minimum size: 1167x400425, maximum size: 16777215x16777215).
createDIB: CreateDIBSection failed.
QWaitCondition: Destroyed while threads are still waiting
C:\Dropbox\build-PowerVelo2-Desktop_Qt_5_2_1_MSVC2012_32bit-Release\release\MaximumTrainer.exe exited with code 1@I also tried to do a manual "resize" and "move" on my QMainWindow on startup, without success
Still investigating..Thanks
-
Weird.. must be something with the environment not working.
Today on my laptop the same project is running fine.
Will post later if I find what was the cause! -
The project ran only 1 time, then the same thing happen, it's probably something related to QSettings that saves an incorrect value for QMainWindow.
Investigating..@void MainWindow::saveSettings() {
QSettings settings("MaxPowerVelo", "PowerVelo"); settings.beginGroup("MainWindow"); settings.setValue("size", size()); settings.setValue("pos", pos()); if (this->isMaximized()) { settings.setValue("maximized", true); } else { settings.setValue("maximized", false); } settings.endGroup();
}@
-
Allright the error message was misleading.
I modified the UI and forgot to set a global variable, then another UI was using that global variable that was not set.Watch out when using global variable is the lesson :)
First Ui:
@account = qApp->property("Account").value<Account*>();
account.id = 1;@Second Ui:
@account = qApp->property("Account").value<Account*>();
if (account.id == 1)
,.,
@