Details
Description
Many applications of KDE on Windows project with graphical interface have the following issue: when they start a console process (that is, compiled with /SUBSYSTEM:CONSOLE) using QProcess::startDetached(), it doesn't run in the background, but its console windows pops up. After the discussion [1] we nailed the problem down to Qt.
Windows code for QProcess::start() checks if the caller app have a console window using GetConsoleWindow() system function. If it returns 0, qt arranges system flags accordingly so the console window isn't shown.
But QProcess::startDetached() does not perform such check and sets CREATE_NEW_CONSOLE flag unconditionally. Applying patch from [2] solves this issue for us, but we'd like to upstream this.
See also:
[1] : https://git.reviewboard.kde.org/r/124905/
[2] : https://git.reviewboard.kde.org/r/127962/diff/1#index_header
[3] : http://stackoverflow.com/questions/33874243/qprocessstartdetached-but-hide-console-window
Attachments
Issue Links
- resulted in
-
QTBUG-57687 [REG 5.7.1 -> 5.8.0] QProcess::startDetached starts cmd.exe without window
- Closed
For Gerrit Dashboard: QTBUG-53833 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
162585,7 | Windows/QProcess::startDetached(): Don't always create console | dev | qt/qtbase | Status: MERGED | +2 | 0 |