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.
Python 2.7、PyQt4.8.5
我想要一个主应用程序窗口,然后是第二个弹出窗口来显示 com 端口设置。在单击确定或取消按钮之前,此窗口应始终位于父窗口的顶部;关闭子窗口。(有点像一个必需的答案,即在您从子窗口中选择设置之前无法处理)
是否有 Python Qt 命令可以执行此操作?
抱歉,如果之前有人问过/回答过这个问题,我的搜索没有返回任何有用的信息。
你想要一个模态对话框。例如:
dialog = QInputDialog() dialog.exec_()
您可以实现自己的对话框小部件(通过子类QDialog化)或使用几个可用的小部件之一。
QDialog