[PyQt] Qt.WindowCloseButtonHint undefined

Phil Thompson phil at riverbankcomputing.com
Sun Jun 7 15:16:21 BST 2009


On Sun, 7 Jun 2009 12:36:14 +0200, Wolfgang Rohdewald
<wolfgang at rohdewald.de> wrote:
> Hello,
> 
>         flags = self.windowFlags()
>         newflags = flags |  Qt.WindowStaysOnTopHint
>         newflags = flags & ~  Qt.WindowCloseButtonHint
>         self.setWindowFlags(newflags)
>         self.show()
> 
> AttributeError: WindowCloseButtonHint
> 
> WindowStaysOnTopHint is defined, but not WindowCloseButtonHint.
> 
> looking at http://doc.trolltech.com/4.5/qt.html#WindowType-enum
> I cannot see why. Could the QT documentation be wrong by not stating
> that WindowCloseButtonHint is new with libqt4.5, or is the pyqt
> interface incomplete?
> 
> I have libqt 4.5.0, pyqt 4.4.4, python-sip4 4.7.9 on kubuntu 9.04

It was added in Qt v4.5.

Phil


More information about the PyQt mailing list