PyGTK:父窗口等待子窗口显示
我正在学习 PyGTK,我有一个父窗口和一个子窗口。在父窗口的方法内部,我创建子窗口,然后刷新树视图...类似这样:
def add_user(self, widget, data = None):
save_user.SaveUser(self.window)
self.load_tree_view()
但是,当它运行时,子窗口出现并执行 load_tree_view() 方法。我希望父窗口等到子窗口打开/显示。之后,load_tree_view 运行...
我该怎么做? 谢谢。
I'm learning PyGTK and I have a parent window and a child window. Inside of a parent window's method, i create the child window and then I refresh a treeview... something like that:
def add_user(self, widget, data = None):
save_user.SaveUser(self.window)
self.load_tree_view()
But, when it's running, the child window appears and the load_tree_view() method is executed. I want that parent window wait until the child window is opened/showed. After that, load_tree_view runs ...
How can I do that?
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
gtk.Dialog 解决了我的问题,但我不知道使用它是否正确......我什么时候应该使用对话框?
“打印'对话框后...'”代码仅在对话框关闭后出现。这就是我想要的。
谢谢。
gtk.Dialog solves my problem but i don't know if is right use that ... When should I use a dialog?
"print 'after dialog...'" code only appears after when the dialog is closed. That is what I want.
Thank you.