Solved I just wanted to add borders to the QTabWidget!
-
I wanted to add borders to the QTabWidget, but suddenly, I found QTabWidget Inherits from QWidget not QFrame.
I google the problem, and now I have two solutions,
ONE, redefine
paintEvent
.TWO, let QFrame to be the QTabWidget's parent by using layouts.
For me, solution 2 is better.
My question is whether there is any other better solution? ( By the way, QTabWidget Inherits from QWidget not QFrame is a bad strategy?)
-
@Limer Why should QTabWidget inherit from QFrame?
If you need a frame around it simply put it into a QFrame. -
@jsulm It is troublesome to put into QFrame.
-
@Limer Sorry, but it is as easy as putting a QFrame and inside that QFrame putting a QTabWidget. What is troublesome about it?