PDA

View Full Version : choose screen where to show MainWindow



bCy
17th May 2016, 12:07
Hey,

I've installed Qt natively on Raspberry Pi. Now, I opened a remote desktop to the pi, wherein I started qt creator. When I press the run button, the output (MainWindow) also goes to the remote desktop.

I have connected a 3,5" Touchscreen via spi to the pi. The screen itself is working fine, since I can see the raspian desktop on it. Now, the question is how can I force Qt to show the MainWindow on the hardware screen instead of my remote desktop?

Any ideas?

Thanks.

anda_skoa
17th May 2016, 17:31
Assuming you run and X server on the device, find the content of the DISPLAY environment variable and set that in the environment used for running the application in creator.

Most likely ":0.0"

Cheers,
_