Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

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

    Language Bindings
    4
    10
    452
    Loading More Posts
    • 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
      Azzazil last edited by Azzazil

      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 Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        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 Reply Quote 0
        • A
          Azzazil @SGaist last edited by Azzazil

          @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 Reply Quote 0
          • SGaist
            SGaist Lifetime Qt Champion last edited by

            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 Reply Quote 0
            • JoeCFD
              JoeCFD last edited by 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 1 Reply Last reply Reply Quote 0
              • A
                Azzazil @SGaist last edited by

                @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 Reply Quote 0
                • SGaist
                  SGaist Lifetime Qt Champion last edited by

                  @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 Reply Quote 1
                  • A
                    Azzazil @JoeCFD last edited by

                    @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 Reply Quote 0
                    • A
                      Azzazil @SGaist last edited by

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

                      1 Reply Last reply Reply Quote 0
                      • P
                        patric01 Banned last edited by patric01

                        This post is deleted!
                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post