Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何遍历parent==0我的 Qt4 应用程序中的所有顶级窗口(即具有 的小部件)?
parent==0
(C++ 和 Python 示例都是可以接受的。)
使用QApplication::topLevelWidgets(). 文档在这里。
QApplication::topLevelWidgets()