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. Resizing QMainWindow and QDialog
Forum Updated to NodeBB v4.3 + New Features

Resizing QMainWindow and QDialog

Scheduled Pinned Locked Moved Unsolved General and Desktop
resizeqmainwindowqt 5python3windows10
7 Posts 3 Posters 3.6k 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.
  • O Offline
    O Offline
    Ocram10
    wrote on 6 Oct 2017, 16:02 last edited by Ocram10 10 Jun 2017, 16:09
    #1

    Hello,
    I would like to know if it is possible to resizing automatically the QMainWindow depending on the Windows' property "resizing and layout" (a sort of zoom) of the desktop..
    Thanks

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 6 Oct 2017, 16:13 last edited by
      #2

      Hi
      Layouts only resizes widgets inside the window.

      It sounds like you want to resize the actual window but what/how does user do it ?

      1 Reply Last reply
      1
      • O Offline
        O Offline
        Ocram10
        wrote on 9 Oct 2017, 07:35 last edited by
        #3

        hi,
        i want that the application being adaptive to the resolution and the layout of the available desktop whitout the user's work

        F 1 Reply Last reply 9 Oct 2017, 07:39
        0
        • O Ocram10
          9 Oct 2017, 07:35

          hi,
          i want that the application being adaptive to the resolution and the layout of the available desktop whitout the user's work

          F Offline
          F Offline
          Fuel
          wrote on 9 Oct 2017, 07:39 last edited by
          #4

          @Ocram10

          you can get the Screen Resolution with QRect rec = QApplication::desktop()->screenGeometry() and at the start up of your program you can set the size of the window that you want. maybe a percentage value.

          O 1 Reply Last reply 9 Oct 2017, 07:49
          0
          • F Fuel
            9 Oct 2017, 07:39

            @Ocram10

            you can get the Screen Resolution with QRect rec = QApplication::desktop()->screenGeometry() and at the start up of your program you can set the size of the window that you want. maybe a percentage value.

            O Offline
            O Offline
            Ocram10
            wrote on 9 Oct 2017, 07:49 last edited by
            #5

            @Fuel ok but if i work with two different screen a primary and a secindary how I can adjust the layout of QMainWindow when I put the application from the primary screen to the secondary. Look the different result in the two different image: 1 in the primary screen and 2 in the secondary I want
            to avoid this effect
            0_1507535243022_Cattura1.PNG 0_1507535256711_Cattura2.PNG

            F 1 Reply Last reply 9 Oct 2017, 08:01
            0
            • O Ocram10
              9 Oct 2017, 07:49

              @Fuel ok but if i work with two different screen a primary and a secindary how I can adjust the layout of QMainWindow when I put the application from the primary screen to the secondary. Look the different result in the two different image: 1 in the primary screen and 2 in the secondary I want
              to avoid this effect
              0_1507535243022_Cattura1.PNG 0_1507535256711_Cattura2.PNG

              F Offline
              F Offline
              Fuel
              wrote on 9 Oct 2017, 08:01 last edited by
              #6

              @Ocram10

              you mean when you pull the window from the screen to the other screen? i dont think that its possible. maybe if there is an event that get triggered when you switch screens.

              O 1 Reply Last reply 9 Oct 2017, 08:23
              0
              • F Fuel
                9 Oct 2017, 08:01

                @Ocram10

                you mean when you pull the window from the screen to the other screen? i dont think that its possible. maybe if there is an event that get triggered when you switch screens.

                O Offline
                O Offline
                Ocram10
                wrote on 9 Oct 2017, 08:23 last edited by
                #7

                @Fuel the exemples in pyqt-master do it automatically but i don't understsnd what event or property they use

                1 Reply Last reply
                0

                6/7

                9 Oct 2017, 08:01

                • Login

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