0

I have RPi 3 B+ and 5" HDMI touch screen.

I wrote this little GUI application in Python:

import sys
import os
from PyQt5 import QtWidgets

class Test(QtWidgets.QDialog):
    def __init__(self):
        super(Test, self).__init__()
        self.setFixedSize(640, 860)

        self.box = QtWidgets.QComboBox()
        self.box.addItem("1")
        self.box.addItem("2")

        box.show()

 if __name__ == "__main__":
     app = QtWidgets.QApplication(sys.argv)
     test = Test()
     test.show()
     sys.exit(app.exec_())

But if I tried to run a app I got this error message:

Invalid MIT-MAGIC-COOKIE-1 keyQXcbConnection: Could not connect to display localhost:10.0
  • I just ran into this problem as of today, everything was working fine before then – Kaan Goksal May 13 at 3:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.