The UI interface shared by a colleague is as follows. I have recently used it to adjust it. I don’t want to change the original structure, but I need to hide all the controls on the right.
I just started trying to use the setVisible method.
ui->btnopen->setVisible(false);
Later it was discovered that this method involves a relatively large amount of code, and all controls involved need to be described. Later, I was pleasantly surprised to find that the controls that needed to be hidden were all distributed on QFrame, so I searched for QFrame hiding methods, as follows:
ui->frame->setHidden(true);
QFrame and all controls are hidden! Greatly saves code space!