Solution 1:

Having the same problem, and I think I found the answer. Basically not possible to run QT on the cloud!

"QT is a GUI library that can run only on your local machine. You cannot run it in the cloud and then let it open a QT window on your machine. You may need to find another labeling library that use web-interface instead."

check this out:

Could not connect to any X display: Google Colab Run-time

Solution 2:

Actually you could make it work with the right platform plugin. By passing for example -platform vnc to your application you should be able to start it in "headless mode". (actually your GUI is drawn to a VNC server you can connect to)

Your error is caused by the absence of a window manager, the xcb platform is trying to access.