What's the difference in Qt between setVisible, setShown and show/hide

后端 未结 2 646
轻奢々
轻奢々 2021-01-03 20:11

Please excuse this potentially noobish question but when trying to hide a QWidget what is the difference between calling setVisible(False), setShown(False) and hide()?

2条回答
  •  星月不相逢
    2021-01-03 20:44

    There is no difference. They are just different ways of achieving the same thing. (Actually setShown isn't really part of the API, it looks like it's a compatibility thing from Qt 3, so best not to use it.)

提交回复
热议问题