I am developing a GUI using PyQt5 on a server with Ubuntu 14.04 via VNC. After I run the following command:
import sys
from PyQt5.QtWidgets import QApplication
app = QApplication(sys.argv)
I always get the following error message:
QXcbConnection: Failed to initialize XRandr
Besides, whenever I select a file in a file dialog created by PyQt5, the file dialog will disappear immediately and anther error message appears:
QXcbConnection: XCB error: 3 (BadWindow), sequence: 449, resource id: 30428093, major code: 40 (TranslateCoords), minor code: 0
I have been searching about this error a lot but didn't find anything helpful yet. Any idea on this?