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. Qt Designer: QGroupBox not showing its entire title
Forum Updated to NodeBB v4.3 + New Features

Qt Designer: QGroupBox not showing its entire title

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
qgroupbtitle bar
7 Posts 3 Posters 131 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.
  • K Offline
    K Offline
    kitebuggy
    wrote last edited by kitebuggy
    #1

    )Hello

    I designed a buttonBox in a GroupBox. The title isn't showed entirely in the box as seen on the imagage:
    alt text
    The code for this image is:
    test.ui

    I can enlarge the QVerticalLayout and the QGroupBox as I want, nothing changes.
    I use QT Designer 6.10.1 on Manjaro Linux.

    What am I doing wrong?

    Thank you.

    1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote last edited by
      #2

      I don't have a problem as soon as I apply a proper layout on the mainwindow

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      0
      • K Offline
        K Offline
        kitebuggy
        wrote last edited by
        #3

        Can you please write exactly what you did?
        Thank you.

        1 Reply Last reply
        0
        • Christian EhrlicherC Offline
          Christian EhrlicherC Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote last edited by
          #4

          See https://doc.qt.io/qt-6/designer-layouts.html on how to work with layouts in designer mode.

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          1 Reply Last reply
          0
          • K Offline
            K Offline
            kitebuggy
            wrote last edited by
            #5

            Excuse me, but I don't understand. I now applied vertical Layout on the GroupBox and the title is broken at the end as soon as I switch its alignement onto flat. The size of the title isn't adjusting to the new font used. I can adjust the size of the GroupBox, but the title size stays unchanged ( Die Box mit dem Titel ändert seine Größe nicht.)

            JonBJ 1 Reply Last reply
            0
            • Christian EhrlicherC Offline
              Christian EhrlicherC Offline
              Christian Ehrlicher
              Lifetime Qt Champion
              wrote last edited by
              #6

              Without a layout on the mainwindow:

              grafik.png

              With layout on mainwindow:

              grafik.png

              Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
              Visit the Qt Academy at https://academy.qt.io/catalog

              1 Reply Last reply
              1
              • K kitebuggy

                Excuse me, but I don't understand. I now applied vertical Layout on the GroupBox and the title is broken at the end as soon as I switch its alignement onto flat. The size of the title isn't adjusting to the new font used. I can adjust the size of the GroupBox, but the title size stays unchanged ( Die Box mit dem Titel ändert seine Größe nicht.)

                JonBJ Online
                JonBJ Online
                JonB
                wrote last edited by JonB
                #7

                @kitebuggy
                I saw your code last night and that it was missing a layout on the central widget of the main window but wasn't sure whether that would produce the behaviour you see.

                So that you know: look at @Christian-Ehrlicher's two screenshots. The first one is your original code. Look at the Object Explorer pane at the right: notice that centralWidget has a "red no-entry sign" on it. Whenever you see that in Designer it indicates you are missing a layout on that widget. See how in the second screenshot that has disappeared. So look out for that when designing.

                (Having said this: I'm not quite sure what is going on with your QGroupBox widget: that still shows a "red no-entry" even though you have added an explicit QVBoxLayout on it. I tend not to add explicit layout objects unless I really need them, you can also set a layout on a widget by right-clicking on it and selecting Layout > (once it has at least one child widget, it's disabled before that) and I do that whenever possible. i am still not sure whether that way or adding an explicit layout as a child result in the same code/behaviour....)

                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