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. Qdialog trouble with change show size
Forum Update on Monday, May 27th 2025

Qdialog trouble with change show size

Scheduled Pinned Locked Moved Unsolved General and Desktop
qt 5.5qdialogwindow size
11 Posts 2 Posters 5.9k Views
  • 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.
  • P Offline
    P Offline
    Psy_Duck
    wrote on last edited by Psy_Duck
    #1

    Hello all!
    I create QDialog for special window. Window hasn't fixed size and add button "WindowMaximizeButtonHint". in order to next time, the window will open in original size (not maximum size, when window was closed), i used next code:
    window->resize(x,y);
    window-show();
    It's worked if i manual change size. After reuse window takes size(x,y), but when i changed size to maximum (by maximize button), closed window and call again window, I get the following result:
    Ka-boom
    Elements have resize, but not the window itself. Window have size like before closing.
    and "window->adjustSize()" gives exactly the same result.
    and return next error:
    "setGeometryDp: Unable to set geometry 640x480+519+264 on QWidgetWindow/'briefWindow'. Resulting geometry: 1680x987+0+23 (frame: 8, 31, 8, 8, custom margin: 0, 0, 0, 0, minimum size: 93x93, maximum size: 16777215x16777215).
    setGeometryDp: Unable to set geometry 640x480+0+23 on QWidgetWindow/'briefWindow'. Resulting geometry: 1680x987+0+23 (frame: 8, 31, 8, 8, custom margin: 0, 0, 0, 0, minimum size: 93x93, maximum size: 16777215x16777215)"
    How to fix it?
    (Option with the removal of the window every time and creating again I do not like)

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by mrjj
      #2

      Hi
      What about setGeometry ?

      You might need to call
      http://doc.qt.io/qt-5/qwidget.html#showNormal
      since it last was in maxi mode.

      P 2 Replies Last reply
      1
      • mrjjM mrjj

        Hi
        What about setGeometry ?

        You might need to call
        http://doc.qt.io/qt-5/qwidget.html#showNormal
        since it last was in maxi mode.

        P Offline
        P Offline
        Psy_Duck
        wrote on last edited by Psy_Duck
        #3

        @mrjj hi. Set geometry don't help, because trouble in Maximized mode, yep.
        showNormal don't help too(
        "setGeometryDp: Unable to set geometry 640x480+0+23 on QWidgetWindow/'briefWindow'. Resulting geometry: 1680x987+0+23 (frame: 8, 31, 8, 8, custom margin: 0, 0, 0, 0, minimum size: 93x93, maximum size: 16777215x16777215)."
        only showMinimized (and showmaxi) don't call it's message, but it's not cool

        1 Reply Last reply
        0
        • mrjjM mrjj

          Hi
          What about setGeometry ?

          You might need to call
          http://doc.qt.io/qt-5/qwidget.html#showNormal
          since it last was in maxi mode.

          P Offline
          P Offline
          Psy_Duck
          wrote on last edited by Psy_Duck
          #4

          @mrjj i can say more:
          "instr->showMinimized();
          instr->showNormal();"
          Not maximize mode:
          window creat minimized and expanded in the normal state
          After maximize mode:
          window creat minimized and expanded in the maximize state (like in picture), but without error message.

          1 Reply Last reply
          0
          • mrjjM Offline
            mrjjM Offline
            mrjj
            Lifetime Qt Champion
            wrote on last edited by
            #5

            but after
            ShowNormal, it should allow you to set the size ?

            P 2 Replies Last reply
            1
            • mrjjM mrjj

              but after
              ShowNormal, it should allow you to set the size ?

              P Offline
              P Offline
              Psy_Duck
              wrote on last edited by
              #6

              @mrjj if you mean
              "instr->showNormal();
              instr->resize(640, 480);"
              it's worked, thank you.
              But call this message again:
              "setGeometryDp: Unable to set geometry 1680x987+8+31 on QWidgetWindow/'briefWindow'. Resulting geometry: 1680x987+0+23 (frame: 8, 31, 8, 8, custom margin: 0, 0, 0, 0, minimum size: 240x240, maximum size: 16777215x16777215)."

              P mrjjM 2 Replies Last reply
              0
              • P Psy_Duck

                @mrjj if you mean
                "instr->showNormal();
                instr->resize(640, 480);"
                it's worked, thank you.
                But call this message again:
                "setGeometryDp: Unable to set geometry 1680x987+8+31 on QWidgetWindow/'briefWindow'. Resulting geometry: 1680x987+0+23 (frame: 8, 31, 8, 8, custom margin: 0, 0, 0, 0, minimum size: 240x240, maximum size: 16777215x16777215)."

                P Offline
                P Offline
                Psy_Duck
                wrote on last edited by
                #7
                This post is deleted!
                1 Reply Last reply
                0
                • P Psy_Duck

                  @mrjj if you mean
                  "instr->showNormal();
                  instr->resize(640, 480);"
                  it's worked, thank you.
                  But call this message again:
                  "setGeometryDp: Unable to set geometry 1680x987+8+31 on QWidgetWindow/'briefWindow'. Resulting geometry: 1680x987+0+23 (frame: 8, 31, 8, 8, custom margin: 0, 0, 0, 0, minimum size: 240x240, maximum size: 16777215x16777215)."

                  mrjjM Offline
                  mrjjM Offline
                  mrjj
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  @Psy_Duck
                  well that message seems to be from maximizing it
                  look the the numbers
                  1680x987+0+23

                  1 Reply Last reply
                  1
                  • mrjjM mrjj

                    but after
                    ShowNormal, it should allow you to set the size ?

                    P Offline
                    P Offline
                    Psy_Duck
                    wrote on last edited by Psy_Duck
                    #9

                    @mrjj if used setgeometry - no problem
                    "look the the numbers
                    1680x987+0+23"
                    eeem, what you mean?

                    mrjjM 1 Reply Last reply
                    0
                    • P Psy_Duck

                      @mrjj if used setgeometry - no problem
                      "look the the numbers
                      1680x987+0+23"
                      eeem, what you mean?

                      mrjjM Offline
                      mrjjM Offline
                      mrjj
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      @Psy_Duck
                      yes
                      seems to be full screen/max ?

                      P 1 Reply Last reply
                      1
                      • mrjjM mrjj

                        @Psy_Duck
                        yes
                        seems to be full screen/max ?

                        P Offline
                        P Offline
                        Psy_Duck
                        wrote on last edited by
                        #11

                        @mrjj said:

                        seems to be full screen/max ?
                        seems.
                        Well, if not used setgeometry, window open in left high angle.

                        1 Reply Last reply
                        1

                        • Login

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