How can I make the child control display more area than the parent control?
Unsolved
General and Desktop
-
auto btn = new QPushButton(parent); btn->setFixedSize(100,100); auto lab = new Qlabel(btn); lab->setFixedSize(200,200); lab->setStyleSheet("color:#000000");
How can I make the child control display more area than the parent control?
I expect the result to be a 200X200 black area,andbtn
is belowlab
. -
Hi,
@jsulm correctly noted, your child can't be bigger than your parent however you can use a QScrollArea to put more widgets in the child and then scroll through it to show the ones you want.