[PyKDE] setWFlags

Rune Hansen rune.hansen at viventus.no
Wed Mar 5 09:57:01 GMT 2003


Is'n it nice to be able to answer ones own questions? Scanning through 
the OBB 0.5's sources gave me the answer.
For the record, the answer is to pass the flags in the class init.
FLAGS =	Qt.WStyle_StaysOnTop \
		+<Qt.anotherflag> \
		+<..>
class myDialog(QDialog):
	def __init__(self,parent=none,name=none,modal=none)
		 QDialog.__init__(self, parent, name,FLAGS)

And it works fine. Sorry for taking up your time.

regards
/rune

Rune Hansen wrote:
> Hi, I'm trying to use QWidget.setWFlags(Qt.<flag>) on a QDialog but have 
> so far only succeded with <Qt.WShowModal>, assuming that QDialog.Show() 
> normaly should not produce a modal dialog.
> I'd like to set  "self.setWFlags(self.WStyle_StaysOnTop)" and get it to 
> work on Windows., not that it works on Linux either with or without the 
> <Qt.WX11BypassWM> flag set.
> self.getWFlags() returns a higher number with the flag set than without 
> so I'm fairly certain that it's beeing set but, sadly, ignored.
> What am I doing wrong <flameproof>other than targeting 
> Windows</flameproof>.
> 
> regards
> 
> /rune
> 
> _______________________________________________
> PyKDE mailing list    PyKDE at mats.gmd.de
> http://mats.gmd.de/mailman/listinfo/pykde




More information about the PyQt mailing list