PySide Bugzilla Closed for New Bugs

PySide is now a Qt Add-on and uses the Qt Project's JIRA Bug Tracker instead of this Bugzilla instance. This Bugzilla is left for reference purposes.

Bug 1127 - x error: badwindow reported when using grabKeyboard() but program works without issue
: x error: badwindow reported when using grabKeyboard() but program works witho...
Status: UNCONFIRMED
Product: PySide
Classification: Unclassified
Component: QtGui
: 1.1.0
: PC Linux
: P5 minor
Assigned To: Hugo Parente Lima
:
:
:
  Show dependency treegraph
 
Reported: 2012-01-22 21:12 EET by Tyler
Modified: 2012-03-08 16:57 EET (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tyler 2012-01-22 21:12:05 EET
Using grabKeyboard() in the following manner throws an X error to the console,
but the program works without issue:

the error:

X Error: BadWindow (invalid Window parameter) 3
  Major opcode: 31 (X_GrabKeyboard)
  Resource id:  0x0

==============
the code:

import sys
from PySide import QtCore, QtGui
from test34_backend import Ui_Form

class CalculatorForm(QtGui.QWidget):
    def __init__(self, parent=None):
        QtGui.QWidget.__init__(self, parent)

        self.ui = Ui_Form()

        self.ui.setupUi(self)
        self.grabKeyboard()

    @QtCore.Slot()
    def on_pushButton_clicked(bool):
        print "Hurray!!"

    @QtCore.Slot()
    def keyPressEvent(self, event):
        kP = event.text()
        if kP in ' ': #spacebar pressed
            print event.text()



if __name__ == "__main__":
    app = QtGui.QApplication(sys.argv)
    calculator = CalculatorForm()
    calculator.show()
    sys.exit(app.exec_())
Comment 1 Matti Airas 2012-03-08 16:57:44 EET
PySide is now a Qt-addon and uses Qt Project's JIRA tool for tracking bugs.
Please verify that the bug is still valid and re-submit it in the address
below:

https://bugreports.qt-project.org/

Sorry for the inconvenience!