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:<br>
<br>##############################<br>from PyQt4 import QtCore, QtGui<br><br>app = QtGui.QApplication([])<br><br>w = QtGui.QListWidget()<br>w.setWindowFlags(QtCore.Qt.Popup)<br>w.addItems(["foo","bar","baz"])<br>
<br>button = QtGui.QPushButton("Click Me")<br>
QtCore.QObject.connect(button, QtCore.SIGNAL("clicked()"), w.show)<br>button.show()<br><br>app.exec_()<br>##############################<br><br>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.<br>
<br>Am I doing something wrong or is this a bug?<br><br>Here are my system specs:<br>GNU/Linux x86_64, Fedora release 8 (Werewolf)<br>PyQt 4.5.4<br><br>