Qt World Summit: Register Today!

How to set QGroupBox in the center?

  • Hi,

    I have QDialog and I would like to have on it QGroupBox and in this QGroupBox have QGridLayout and in this QGridLayout have random Widgets ( red in picture ). And I have, what I want.

    But I would like to have situation like in a picture:


    So I would like to have an empty space between QGroupBox and QDialog' margins ( green arrows ). I tried with:


    But it doesn't do what I want.

  • Lifetime Qt Champion


    Did you put your QGrouoBox in a layout ?

Log in to reply