I'm making a program for my raspberry pi in python and pyqt4. Now I'm starting the program on my raspberry and it gives errors and it doesn't show the buttons I have made. I have designed into qtdesinger, it shows the window but nothing on it.
This is the error i have:
X Error: BadAccess (attempt to access private resource denied) 10
Extension: 129 (MIT-SHM)
Minor opcode: 1 (X_ShmAttach)
Resource id: 0x2800001
X Error: BadShmSeg (invalid shared segment parameter) 128
Extension: 129 (MIT-SHM)
Minor opcode: 5 (X_ShmCreatePixmap)
Resource id: 0x280000a
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x280000b
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x280000b
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x280000b
This my python code from the qtdesigner:
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
_fromUtf8 = lambda s: s
class Ui_Form(object):
def setupUi(self, Form):
Form.setObjectName(_fromUtf8("Form"))
Form.resize(480, 640)
self.pushButton = QtGui.QPushButton(Form)
self.pushButton.setGeometry(QtCore.QRect(120, 140, 83, 24))
self.pushButton.setObjectName(_fromUtf8("pushButton"))
self.toolButton = QtGui.QToolButton(Form)
self.toolButton.setGeometry(QtCore.QRect(350, 250, 27, 20))
self.toolButton.setObjectName(_fromUtf8("toolButton"))
self.buttonBox = QtGui.QDialogButtonBox(Form)
self.buttonBox.setGeometry(QtCore.QRect(150, 280, 156, 24))
self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDia$
self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
self.commandLinkButton = QtGui.QCommandLinkButton(Form)
self.commandLinkButton.setGeometry(QtCore.QRect(160, 230, 168, 41))
self.commandLinkButton.setObjectName(_fromUtf8("commandLinkButton"))
self.checkBox = QtGui.QCheckBox(Form)
self.checkBox.setGeometry(QtCore.QRect(130, 380, 84, 19))
self.checkBox.setObjectName(_fromUtf8("checkBox"))
self.toolButton_2 = QtGui.QToolButton(Form)
self.toolButton_2.setGeometry(QtCore.QRect(160, 470, 27, 20))
self.toolButton_2.setObjectName(_fromUtf8("toolButton_2"))
self.listView = QtGui.QListView(Form)
self.listView.setGeometry(QtCore.QRect(60, 460, 256, 192))
self.listView.setObjectName(_fromUtf8("listView"))
self.retranslateUi(Form)
QtCore.QMetaObject.connectSlotsByName(Form)
def retranslateUi(self, Form):
Form.setWindowTitle(QtGui.QApplication.translate("Form", "Form", None, QtG$
self.pushButton.setText(QtGui.QApplication.translate("Form", "Lamp", None,$
self.toolButton.setText(QtGui.QApplication.translate("Form", "...", None, $
self.commandLinkButton.setText(QtGui.QApplication.translate("Form", "Comma$
self.checkBox.setText(QtGui.QApplication.translate("Form", "CheckBox", Non$
self.toolButton_2.setText(QtGui.QApplication.translate("Form", "...", None$
and this my file to show the window: import sys from PyQt4 import QtCore, QtGui from test import Ui_Widget
class StartQT4(QtGui.QMainWindow):
def __init__(self, parent=None):
QtGui.QWidget.__init__(self, parent)
self.ui = Ui_Widget()
self.ui.setupUi(self)
if __name__ == "__main__":
app = QtGui.QApplication(sys.argv)
myapp = StartQT4()
myapp.show()
sys.exit(app.exec_())
Does have annybody a solution for me? I googled the error but found no answers for my problem.
Thanks...