can i use 2 widget at the same place, and everytime i only allow 1 widget visible?
-
can i use 2 widget at the same place, and everytime i only allow 1 widget visible?
for many reason, it seems that i have to use 2 widget (QTreeWidget & QListWidget) at the Same place, and everytime I allow the user only see 1 of them.
how could i do this?
set them to a parent Layout or a Widget? and then setVisible() to control which one is shown to the user? -
Yes you can put them in a layout and use setVisible(false/true) to hide or show the widget.
-
QStackedLayout and QStackedWidget seems to do this work.