QGroupBox: sunken frame problem

  • Hello,

    I'm trying to make a QGroupBox have a deeper, sunken frame without success. SetFrameStyle seems unavailable in 4.7 and setStyleSheet("border-style: inset;") makes the QGroupBox disappear, even if it's background color is different from the mainWindow.

    So, is there another way?


  • In order for the border to show up, try giving it a value for the width as shown below. Does that help?

    @box->setStyleSheet(" QGroupBox { border-style: inset; border: 1px solid black;}");@

    Also, perhaps using QFrame instead of QGroupBox makes it easier to achieve what you want?

  • Thanks for the QFrame suggestion. QFrame allows me to use the setFrameStyle and setLineWidth. This makes the frame deeper.

Log in to reply

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