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()?
相关问题
- QML: Cannot read property 'xxx' of undefin
- QTextEdit.find() doesn't work in Python
- QT Layouts, how to make widgets in horizontal layo
- QT GUI freezes even though Im running in separate
- QGraphicsView / QGraphicsScene size matching
相关文章
- ubuntu20.4中c#通过c++库调用python脚本
- Qt槽函数自动执行多遍
- Is there a non-java, cross platform way to launch
- How to get a settings storage path in a cross-plat
- Why doesn't valgrind detect a memory leak in m
- QTreeView remove decoration/expand button for all
- qt界面拥挤
- how do I correctly return values from pyqt to Java
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.)
show()
is just a convenience function forsetVisible(true)
.Similarly
hide()
is equivalent tosetVisible(false)
Internally, the same code is used to render your view.
See http://doc.qt.io/archives/qt-4.7/qwidget.html#show as an example. According to it,
You'll find lots of such functions in Qt to just make things more intuitive, especially when it comes to widgets and views.