Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [SOLVED] QWindowsWindow::setGeometry - Unable to set geometry
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] QWindowsWindow::setGeometry - Unable to set geometry

Scheduled Pinned Locked Moved General and Desktop
4 Posts 1 Posters 9.9k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    maximus
    wrote on 10 Jul 2014, 11:33 last edited by
    #1

    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


    Free Indoor Cycling Software - https://maximumtrainer.com

    1 Reply Last reply
    0
    • M Offline
      M Offline
      maximus
      wrote on 10 Jul 2014, 12:56 last edited by
      #2

      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!


      Free Indoor Cycling Software - https://maximumtrainer.com

      1 Reply Last reply
      0
      • M Offline
        M Offline
        maximus
        wrote on 10 Jul 2014, 13:07 last edited by
        #3

        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();
        

        }@


        Free Indoor Cycling Software - https://maximumtrainer.com

        1 Reply Last reply
        0
        • M Offline
          M Offline
          maximus
          wrote on 10 Jul 2014, 14:07 last edited by
          #4

          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)
          ,.,
          @


          Free Indoor Cycling Software - https://maximumtrainer.com

          1 Reply Last reply
          0

          1/4

          10 Jul 2014, 11:33

          • Login

          • Login or register to search.
          1 out of 4
          • First post
            1/4
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved