QProcess with DPI issues.
Unsolved
General and Desktop
-
When external abc.exe is started through the QProcess startDetached() method, the dpi of abc.exe will become very large. How can we prevent abc.exe from being affected by the DPI setting of its own exe?
Through the following QProcess method, I can successfully start the external abc.exe program, but there is a problem because my own exe sets the DPI:
QGuiApplication::setHighDpiScaleFactorRoundingPolicy( Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
QProcess *process = new QProcess(this); process->setProgram(str_Path); //str_Path --> "D:/test/abc.exe" process->setWorkingDirectory(info.path()); //info.path() --> "D:/test" bool is_start = process->startDetached();