Details
-
Bug
-
Resolution: Out of scope
-
Not Evaluated
-
None
-
5.9.2
-
None
-
Windows 10
Visual Studio 2013 and 2017
Using Qt 5.9.2 LTS 64 bit prebuilt binaries for VS 2013 and 2017
Description
I have a simple Qt project (see attachment) to start a detached process on start up for cmd.exe
#include <cassert> #include <QProcess> #include "mainwindow.h" #include "ui_mainwindow.h" MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); QProcess p; bool ok = p.startDetached("C:/Windows/system32/cmd.exe"); assert(ok); } MainWindow::~MainWindow() { delete ui; }
When I build this project using Qt Creator with Qt 5.6.3 it works as expected; the command line window is displayed on application start up.
When I switch over to build the project using Qt 5.9.1 or 5.9.2, the command line window is not displayed on application start up. However, I can see that the cmd.exe process has indeed started as it is listed in the Task Manager. I can see this behaviour when using either VS 2013 or 2017 compilers.