[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] setting Popup windowFlag causes system to become
From:       Jugdish <jugdizh () gmail ! com>
Date:       2009-11-30 10:36:30
Message-ID: 4beab6d40911300236o2c7ebd71y6aa6cfce58fcc1fa () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Bug report filed here:

http://bugreports.qt.nokia.com/browse/QTBUG-6355

On Fri, Nov 27, 2009 at 8:50 PM, Hans-Peter Jansen <hpj@urpla.net> wrote:

> On Friday 27 November 2009, 19:34:31 Jugdish wrote:
> > For some reason if I set the windowFlag "Popup" on a QListWidget, the
> > widget takes modal focus and it is impossible to give focus back to any
> > widget. In fact, my entire system becomes unresponsive. Only the
> > QListWidget responds to input, and I have no way of killing the process.
> > Here is a very stripped down example of this problem:
> >
> > ##############################
> > from PyQt4 import QtCore, QtGui
> >
> > app = QtGui.QApplication([])
> >
> > w = QtGui.QListWidget()
> > w.setWindowFlags(QtCore.Qt.Popup)
> > w.addItems(["foo","bar","baz"])
> >
> > button = QtGui.QPushButton("Click Me")
> > QtCore.QObject.connect(button, QtCore.SIGNAL("clicked()"), w.show)
> > button.show()
> >
> > app.exec_()
> > ##############################
> >
> > When I run this bit of code and click on the button, a QListWidget pops
> > up on top of everything. I can select each of the 3 items in the list as
> > expected, but if I click anywhere outside the QListWidget, nothing
> > responds, not even if I try to click on items in the taskbar or the
> > windows for other running apps! It has something to do with it being a
> > QListWidget, because if I change it to just a QWidget, I can click
> > outside of it and things still respond.
> >
> > Am I doing something wrong or is this a bug?
>
> Same here. Almost certainly, this is a Qt bug. Please file a bug report.
> You
> should be able to workaround this behavior by subclassing QListWidget() and
> adding custom event handler. You will want to do that anyway, since the
> QListWidget appearing in the top left corner isn't that useful either.
>
> > Here are my system specs:
> > GNU/Linux x86_64, Fedora release 8 (Werewolf)
> > PyQt 4.5.4
>
> openSUSE i585, sip 4.9.3, PyQt 4.6.2, Qt 4.5.3
>
> Pete
> _______________________________________________
> PyQt mailing list    PyQt@riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>

[Attachment #5 (text/html)]

Bug report filed here:<br><br><a \
href="http://bugreports.qt.nokia.com/browse/QTBUG-6355">http://bugreports.qt.nokia.com/browse/QTBUG-6355</a><br><br><div \
class="gmail_quote">On Fri, Nov 27, 2009 at 8:50 PM, Hans-Peter Jansen <span \
dir="ltr">&lt;<a href="mailto:hpj@urpla.net">hpj@urpla.net</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); \
margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">On \
Friday 27 November 2009, 19:34:31 Jugdish wrote:<br> &gt; For some reason if I set \
the windowFlag &quot;Popup&quot; on a QListWidget, the<br> &gt; widget takes modal \
focus and it is impossible to give focus back to any<br> &gt; widget. In fact, my \
entire system becomes unresponsive. Only the<br> &gt; QListWidget responds to input, \
and I have no way of killing the process.<br> &gt; Here is a very stripped down \
example of this problem:<br> &gt;<br>
&gt; ##############################<br>
&gt; from PyQt4 import QtCore, QtGui<br>
&gt;<br>
&gt; app = QtGui.QApplication([])<br>
&gt;<br>
&gt; w = QtGui.QListWidget()<br>
&gt; w.setWindowFlags(QtCore.Qt.Popup)<br>
&gt; w.addItems([&quot;foo&quot;,&quot;bar&quot;,&quot;baz&quot;])<br>
&gt;<br>
&gt; button = QtGui.QPushButton(&quot;Click Me&quot;)<br>
&gt; QtCore.QObject.connect(button, QtCore.SIGNAL(&quot;clicked()&quot;), w.show)<br>
&gt; button.show()<br>
&gt;<br>
&gt; app.exec_()<br>
&gt; ##############################<br>
&gt;<br>
&gt; When I run this bit of code and click on the button, a QListWidget pops<br>
&gt; up on top of everything. I can select each of the 3 items in the list as<br>
&gt; expected, but if I click anywhere outside the QListWidget, nothing<br>
&gt; responds, not even if I try to click on items in the taskbar or the<br>
&gt; windows for other running apps! It has something to do with it being a<br>
&gt; QListWidget, because if I change it to just a QWidget, I can click<br>
&gt; outside of it and things still respond.<br>
&gt;<br>
&gt; Am I doing something wrong or is this a bug?<br>
<br>
</div></div>Same here. Almost certainly, this is a Qt bug. Please file a bug report. \
You<br> should be able to workaround this behavior by subclassing QListWidget() \
and<br> adding custom event handler. You will want to do that anyway, since the<br>
QListWidget appearing in the top left corner isn&#39;t that useful either.<br>
<div class="im"><br>
&gt; Here are my system specs:<br>
&gt; GNU/Linux x86_64, Fedora release 8 (Werewolf)<br>
&gt; PyQt 4.5.4<br>
<br>
</div>openSUSE i585, sip 4.9.3, PyQt 4.6.2, Qt 4.5.3<br>
<br>
Pete<br>
<div><div></div><div class="h5">_______________________________________________<br>
PyQt mailing list    <a \
href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a><br> <a \
href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt" \
target="_blank">http://www.riverbankcomputing.com/mailman/listinfo/pyqt</a><br> \
</div></div></blockquote></div><br>



_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic