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. Formatting Object in Form Layout
Forum Updated to NodeBB v4.3 + New Features

Formatting Object in Form Layout

Scheduled Pinned Locked Moved Unsolved General and Desktop
35 Posts 3 Posters 4.9k Views 3 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.
  • M mzimmers
    21 May 2019, 18:34

    Thanks for taking the time to do that, kshegunov. So, I guess the takeaway is that pretty much everything needs layouts? I'd been limiting my use of them to where I could see they were needed, but if failing to use them results in stuff (like my radio buttons) not showing up, then I guess they're needed in more places than are immediately evident.

    K Offline
    K Offline
    kshegunov
    Moderators
    wrote on 21 May 2019, 19:05 last edited by
    #15

    @mzimmers said in Formatting Object in Form Layout:

    So, I guess the takeaway is that pretty much everything needs layouts?

    Yes, pretty much. The widget depends on its layout to manage the geometry of the children, so if there's none the children float freely. Child layouts (the ones in red) are much more rarely needed, but the widgets have to have them to display properly.

    Read and abide by the Qt Code of Conduct

    1 Reply Last reply
    1
    • M Offline
      M Offline
      mzimmers
      wrote on 21 May 2019, 20:15 last edited by
      #16

      Makes sense. With the addition of some spacers, I was able to get the layout a little more to my liking.

      So, what's the verdict on my IP selector: should I be using a Frame or a QGroupBox?

      1 Reply Last reply
      0
      • S Offline
        S Offline
        SGaist
        Lifetime Qt Champion
        wrote on 21 May 2019, 20:20 last edited by
        #17

        Use whatever gets you the result you are looking for.

        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
        • M Offline
          M Offline
          mzimmers
          wrote on 21 May 2019, 21:11 last edited by
          #18

          Right now, I'm experiencing the same spacing problem with either.
          0_1558473079665_space.PNG

          What might I be doing to create that large gap between the Device Name and the IP Assignment Source?

          1 Reply Last reply
          0
          • S Offline
            S Offline
            SGaist
            Lifetime Qt Champion
            wrote on 21 May 2019, 21:23 last edited by
            #19

            Might be a silly question but do you have any empty row ?

            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
            • M Offline
              M Offline
              mzimmers
              wrote on 21 May 2019, 21:28 last edited by
              #20

              No.

              0_1558474125044_design.PNG

              1 Reply Last reply
              0
              • S Offline
                S Offline
                SGaist
                Lifetime Qt Champion
                wrote on 23 May 2019, 21:22 last edited by
                #21

                Is it me or does it look like your widget is somehow aligned on the bottom of the grid rather than the center ?

                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
                • M Offline
                  M Offline
                  mzimmers
                  wrote on 23 May 2019, 21:34 last edited by
                  #22

                  Are you referring to the IP Assignment Source widget (the one you can't see)? According to the Property Editor, it's centered.

                  The amount of space suggests that the grid "thinks" there's another line to go in between "Device Name" and "IP Assignment Source." I don't know whether that's possible, though...

                  K 1 Reply Last reply 24 May 2019, 08:54
                  0
                  • M mzimmers
                    23 May 2019, 21:34

                    Are you referring to the IP Assignment Source widget (the one you can't see)? According to the Property Editor, it's centered.

                    The amount of space suggests that the grid "thinks" there's another line to go in between "Device Name" and "IP Assignment Source." I don't know whether that's possible, though...

                    K Offline
                    K Offline
                    kshegunov
                    Moderators
                    wrote on 24 May 2019, 08:54 last edited by
                    #23

                    What about the actual widget you insert? The small one?

                    Read and abide by the Qt Code of Conduct

                    M 1 Reply Last reply 24 May 2019, 21:33
                    0
                    • K kshegunov
                      24 May 2019, 08:54

                      What about the actual widget you insert? The small one?

                      M Offline
                      M Offline
                      mzimmers
                      wrote on 24 May 2019, 21:33 last edited by
                      #24

                      @kshegunov same thing: AlignLeft, AlignVCenter.

                      1 Reply Last reply
                      0
                      • S Offline
                        S Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on 25 May 2019, 21:20 last edited by
                        #25

                        I wonder if it's because you have the label that is currently wrapping. For the sake of testing, can you change the text to one word to see if it changes anything ?

                        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
                        • M Offline
                          M Offline
                          mzimmers
                          wrote on 26 May 2019, 15:23 last edited by
                          #26

                          Tried it...no change.

                          1 Reply Last reply
                          0
                          • S Offline
                            S Offline
                            SGaist
                            Lifetime Qt Champion
                            wrote on 26 May 2019, 19:45 last edited by
                            #27

                            Since it's a designer created widget, would it be possible to post the source of that widget so we can take a look at it ? I'm running out of ideas.

                            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
                            • M Offline
                              M Offline
                              mzimmers
                              wrote on 26 May 2019, 21:16 last edited by
                              #28

                              link

                              Thanks for looking...

                              1 Reply Last reply
                              0
                              • S Offline
                                S Offline
                                SGaist
                                Lifetime Qt Champion
                                wrote on 27 May 2019, 20:59 last edited by
                                #29

                                Sorry but I have a 404 error for that link.

                                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
                                • M Offline
                                  M Offline
                                  mzimmers
                                  wrote on 27 May 2019, 21:50 last edited by
                                  #30

                                  Odd...so do I now. Let's try again with another host:

                                  link

                                  1 Reply Last reply
                                  0
                                  • S Offline
                                    S Offline
                                    SGaist
                                    Lifetime Qt Champion
                                    wrote on 28 May 2019, 20:47 last edited by
                                    #31

                                    Worked !

                                    But it's requiring IpSource which is rightfully missing

                                    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
                                    • M Offline
                                      M Offline
                                      mzimmers
                                      wrote on 28 May 2019, 20:54 last edited by
                                      #32

                                      Here's ipsource.ui:

                                      link

                                      1 Reply Last reply
                                      0
                                      • S Offline
                                        S Offline
                                        SGaist
                                        Lifetime Qt Champion
                                        wrote on 28 May 2019, 22:30 last edited by
                                        #33

                                        Making it IpSource a simple QWidget with the two radio buttons in a vertical layout from which your put all margins to 0 seems to do the trick.

                                        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
                                        2
                                        • M Offline
                                          M Offline
                                          mzimmers
                                          wrote on 29 May 2019, 22:39 last edited by
                                          #34

                                          Yes it does. That's kind of wild.

                                          I'm not quite sure what this says about the QFrame and QGroupBox classes, but I guess the answer is not to use either inside a grid if you care about your spacing.

                                          Anyway, thanks for chasing this down.

                                          K 1 Reply Last reply 29 May 2019, 22:45
                                          0

                                          24/35

                                          24 May 2019, 21:33

                                          • Login

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