[Interest] How to read screen information from QGuiApplication to put in qputenv environment variable?

Thiago Macieira thiago.macieira at intel.com
Tue Feb 16 00:08:54 CET 2021

On Monday, 15 February 2021 03:50:39 PST Anisha kaul wrote:
> Greetings,
> The problem is that qputenv does not work if written after the
> initialization of QGuiApplication.

qputenv works just fine becauase the environment is set.

Did you mean to say that QGuiApplication will not react to the variable set? 
That's because it only reads the variable in the constructor. So you must set 
the variable before it is read.

PS: don't set environment variables inside the application. Solve your problem 
another way.

Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel DPG Cloud Engineering

More information about the Interest mailing list