How to set QT_QPA_PLATFORM for test

1k views Asked by At

I have some Qt tests that pop up a window when run. Therefore i want to add possibility to disable their rendering.Can I set in cmake environment variable QT_QPA_PLATFORM to offscreeen only for test?

1

There are 1 answers

0
Michał Leon On

I use it for my tests and that's the way to go:

QT_QPA_PLATFORM=offscreen executable

This is POSIX-compatible, so thiw will also work on Windows.