Hi all,

I am trying to ignore the close event of a subwindow, but I don't know how
to do that.

Expecting for your suggestions.

Here is my code

import sys
from PyQt4.QtGui import*
from PyQt4 import QtCore
from PyQt4 import Qt


import ui_F1 as MW

class App(QMainWindow,MW.Ui_Form):
    def __init__(self,parent=None):
        super(App,self).__init__(parent)
        self.setupUi(self)
        flags=QtCore.Qt.Popup
        flags |= QtCore.Qt.WindowTitleHint
        self.subwindow.setWindowFlags(flags)
        self.mdiArea.addSubWindow(self.subwindow)
        self.subwindow.show()
        self.connect(self, Qt.SIGNAL('triggered()'),self.closeEvent)


    def closeEvent(subwindow,event):
        subwindow.event.ignore()


if __name__ == "__main__":
    app=QApplication(sys.argv)
    form=App()
    form.showMaximized()
    app.exec_()

Many thanks,

Jothy
_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to