Remove QGroupbox border without mashing layout



  • I've got a UI, with several groupboxes (some nested) to handle layout. The layout is fine, but each groupbox has a border, and it looks awful.

    I tried setting the groupbox border width to zero with a style, but that made the contents of the groupbox collide with the title of the groupbox.

    I want all the widgets to remain exactly where they are, but without drawing borders on the groupboxes (or drawing them transparent, or the same colour as the background, or some other means of making them invisible).

    How can I do this?


  • Moderators

    If you use :
    @
    groupBox->setFlat(true);
    @

    then you don't get the borders, but only a line next to the tile

    hope it helps


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.