[英]What is best signal for writing configuration file in pyGTK?
I want to save window position and size when user is closing main window of my application, but i cant get correct window position 当用户关闭我的应用程序的主窗口时,我想保存窗口位置和大小,但我无法获得正确的窗口位置
myTopLevelWindow.connect('unrealize', self.__onUnrealize)
def __onUnrealize(self, widget):
myTopLevelWindow.get_size() #OK
myTopLevelWindow.get_position() <-- always (0, 0) :P
in what signal handler get_position() will work correctly? 在什么信号处理程序get_position()将正常工作? I've tried 'destroy' and it's also not good :/
我试过'破坏'而且它也不好:/
Have you tried "delete-event"? 你试过“删除事件”吗? I just tested it in C and gtk gives me the correct position/size in the handler.
我只是在C中测试它,并且gtk在处理程序中给出了正确的位置/大小。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.