Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Resize objects with mainwindow is maximized
Forum Updated to NodeBB v4.3 + New Features

Resize objects with mainwindow is maximized

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
7 Posts 2 Posters 915 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.
  • Jona3717J Offline
    Jona3717J Offline
    Jona3717
    wrote on last edited by Jona3717
    #1

    Re: Resize Objects With Mainwindow Resize

    Hi, i'm using Qt Creator. My main window have a qTextEdit object and when this is resized the object change her size only some bit. I want at my object resize along with the main window. I'm using horizontal layout, but this isn't working. How can fix this?

    My Code:

    Source file: https://paste.centos.org/view/ce954c9e
    Header file: https://paste.centos.org/view/201d34d5
    Ui file: https://paste.centos.org/view/94191786

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

      Hi and welcome to devnet,

      Please show your code. You don't give enough information to even guess what might be happening.

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

      1 Reply Last reply
      1
      • Jona3717J Offline
        Jona3717J Offline
        Jona3717
        wrote on last edited by
        #3

        Okay, i edited this.

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

          Why did you set the size policy to minimum for both horizontal and vertical ?

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

          Jona3717J 1 Reply Last reply
          1
          • SGaistS SGaist

            Why did you set the size policy to minimum for both horizontal and vertical ?

            Jona3717J Offline
            Jona3717J Offline
            Jona3717
            wrote on last edited by
            #5

            @SGaist because only with this option the interface is “okay". Before, that was in preferred, but searching on the internet I saw a recommendation to use minimal.

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

              Can you provide a complete minimal example code ? That way we may try to reproduce your issue with the exact same initial conditions as you.

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

              1 Reply Last reply
              0
              • Jona3717J Offline
                Jona3717J Offline
                Jona3717
                wrote on last edited by
                #7

                I fixed it by editing the .ui file, the problem is that I had adjusted the sizePolicy of the QTextEdit in QAbstractScrollArea :: AdjustToContentsOnFirstShow. Thanks for everything.

                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