Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-57687

[REG 5.7.1 -> 5.8.0] QProcess::startDetached starts cmd.exe without window

    XMLWordPrintable

Details

    • Windows
    • 31e782cc9609c2f1c201453841f36ed7dae25890, b137734e6b67dc6b9615c1d200e9f9c5a3b8fee7

    Description

      1. Build and run this program:
        #include <QApplication>
        #include <QProcess>
        #include <QPushButton>
        
        void startProcess()
        {
            QProcess p;
            p.startDetached("C:\\WINDOWS\\system32\\cmd.exe",
                            QStringList(),
                            "C:\\Users");
        }
        
        int main(int argc, char *argv[])
        {
            QApplication a(argc, argv);
            QPushButton pb("Open Terminal");
            pb.show();
        
            pb.connect(&pb, &QPushButton::clicked,
                       [] () {startProcess();});
        
            return a.exec();
        }
        
      2. Click the button.
        Nothing seems to happen. In the task manager you can seeslash. that cmd.exe was started but it does not have a window.

      The windows command prompt should be shown. With 5.7.1, this works correctly.

      This might have been introduced by https://codereview.qt-project.org/162585/

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              jbornema Joerg Bornemann
              rlohning Robert Löhning
              Votes:
              1 Vote for this issue
              Watchers:
              15 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes