1

Im working on a little program that require a QGroupBox that have inside a QLineEdit. I want to make "invisible" the border of the QGroupBox using:

groupBoxName->setStyleSheet("border:0;");

The problem is that even the QLineEdit inside of it inherit this style. How can I make invisible the QGroupBox border but not the QLineEdit border? Thanks

m7913d
  • 10,244
  • 7
  • 28
  • 56

1 Answers1

2

Give an object name for the groupbox using setObjectName() function,

group_box->setObjectName("MyBox");

Then you could style it as a css object.

group_box->setStyleSheet("#MyBox{border:0

This will only affect the #MyBox

me_alok
  • 241
  • 2
  • 6