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. QGroupBox, 2 Radio Buttons, not big enough
Forum Updated to NodeBB v4.3 + New Features

QGroupBox, 2 Radio Buttons, not big enough

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 270 Views 2 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.
  • SPlattenS Offline
    SPlattenS Offline
    SPlatten
    wrote on last edited by
    #1

    I have a QGridLayout, in this layout I have added a QGroupBox this group box has two QRadioButton instances. The text to go with each radio button is Male and Female. When this is rendered both texts are cut short, Male only shows Mal with e cut in half, Female only displays Fem, the group box is just to small. Why does this happen and how can I avoid it?

    On the form the is plenty of space on the row that contains this group box.

    Kind Regards,
    Sy

    JoeCFDJ Pl45m4P 2 Replies Last reply
    0
    • SPlattenS SPlatten

      I have a QGridLayout, in this layout I have added a QGroupBox this group box has two QRadioButton instances. The text to go with each radio button is Male and Female. When this is rendered both texts are cut short, Male only shows Mal with e cut in half, Female only displays Fem, the group box is just to small. Why does this happen and how can I avoid it?

      On the form the is plenty of space on the row that contains this group box.

      JoeCFDJ Offline
      JoeCFDJ Offline
      JoeCFD
      wrote on last edited by JoeCFD
      #2

      @SPlatten add size policies to your widgets. Make a small test case in Qt designer and layout your widgets there to make sure your widgets resize properly. Check the C++ code from the ui file generated in designer. Then you will know where your problem is.

      1 Reply Last reply
      0
      • SPlattenS SPlatten

        I have a QGridLayout, in this layout I have added a QGroupBox this group box has two QRadioButton instances. The text to go with each radio button is Male and Female. When this is rendered both texts are cut short, Male only shows Mal with e cut in half, Female only displays Fem, the group box is just to small. Why does this happen and how can I avoid it?

        On the form the is plenty of space on the row that contains this group box.

        Pl45m4P Offline
        Pl45m4P Offline
        Pl45m4
        wrote on last edited by
        #3

        @SPlatten

        Your QGroupBox is in a QGridLayout, but does your QGroupBox have any layout? From your description it looks like you've put your QRadioButtons in without applying a layout.


        If debugging is the process of removing software bugs, then programming must be the process of putting them in.

        ~E. W. Dijkstra

        1 Reply Last reply
        0
        • SPlattenS Offline
          SPlattenS Offline
          SPlatten
          wrote on last edited by
          #4

          @JoeCFD , thank you for the response, my widgets are manually positioned and added to groups in code.

          Yes, I create the QGridLayout first then a QGroupBox, I've resolved this issue now.

          Kind Regards,
          Sy

          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