Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Language Bindings
  4. [PySide/QWidget] Screen resize issue between monitor and laptop
QtWS25 Last Chance

[PySide/QWidget] Screen resize issue between monitor and laptop

Scheduled Pinned Locked Moved Unsolved Language Bindings
10 Posts 4 Posters 1.2k 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.
  • A Offline
    A Offline
    Azzazil
    wrote on last edited by Azzazil
    #1

    Hello,

    I made a widget for some mechanical engineering calculations. I was developing this while I was on my monitor with screen resolution 1920x1080, while I did some test on my laptop with screen resolution 1366x768 I was surprised that I can't see whole size of my widget. Widget on my laptop screen was choped by limits of my screen on my laptop. Does anybody know how to solve this?

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

      Hi and welcome to devnet,

      The first thing to do if you haven't already is to use layouts to handle placement and sizing of your widgets.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      A 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi and welcome to devnet,

        The first thing to do if you haven't already is to use layouts to handle placement and sizing of your widgets.

        A Offline
        A Offline
        Azzazil
        wrote on last edited by Azzazil
        #3

        @SGaist thanks for your reply, yes I am using also layouts. Maybe it will be better if I show screen shots differences between screens on monitor and laptop.

        Laptop screen
        Monitor screen

        You can see that in monitor example I have back button, and in laptop screen that's choped off.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          What do you mean by "also" ?

          Are you using fixed sizes in your GUI ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          A 1 Reply Last reply
          0
          • JoeCFDJ Offline
            JoeCFDJ Offline
            JoeCFD
            wrote on last edited by JoeCFD
            #5

            add some top margin in the main layout and align your widgets to the top. Or add a spacer at the bottom of the main layout. Do not expect Qt is doing everything for you.

            A 1 Reply Last reply
            0
            • SGaistS SGaist

              What do you mean by "also" ?

              Are you using fixed sizes in your GUI ?

              A Offline
              A Offline
              Azzazil
              wrote on last edited by
              #6

              @SGaist I was thinking on layout QVBoxLayout in these groupbox, with title "Calculate transverse force" and "Calculate mate force". I am using fixed size for MainWindow size.

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #7

                @Azzazil said in [PySide/QWidget] Screen resize issue between monitor and laptop:

                I am using fixed size for MainWindow size.

                There lies your issue.

                You can use a QGridLayout or a combo of QVBoxLayout and QHBoxLayout to place your tree widgets.

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                A 1 Reply Last reply
                1
                • JoeCFDJ JoeCFD

                  add some top margin in the main layout and align your widgets to the top. Or add a spacer at the bottom of the main layout. Do not expect Qt is doing everything for you.

                  A Offline
                  A Offline
                  Azzazil
                  wrote on last edited by
                  #8

                  @JoeCFD I don't expect, I am still learning so I don't know all Qt features.
                  OK so you propose that I can solve this with setContentsMargins for layouts and widgets? I will give it a shot.

                  1 Reply Last reply
                  0
                  • SGaistS SGaist

                    @Azzazil said in [PySide/QWidget] Screen resize issue between monitor and laptop:

                    I am using fixed size for MainWindow size.

                    There lies your issue.

                    You can use a QGridLayout or a combo of QVBoxLayout and QHBoxLayout to place your tree widgets.

                    A Offline
                    A Offline
                    Azzazil
                    wrote on last edited by
                    #9

                    @SGaist Thanks for advice, I will try to use them.

                    1 Reply Last reply
                    0
                    • P Offline
                      P Offline
                      patric01
                      Banned
                      wrote on last edited by patric01
                      #10
                      This post is deleted!
                      1 Reply Last reply
                      0

                      • Login

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