Am 26.01.2017 um 13:46 schrieb Björn Piltz:
https://bugreports.qt.io/browse/QTBUG-57687

2017-01-26 13:45 GMT+01:00 Björn Piltz <[email protected] <mailto:[email protected]>>:

    Seems to be because of this:
    
http://code.qt.io/cgit/qt/qtbase.git/commit/src/corelib/io/qprocess_win.cpp?id=bec2fc19fd18768b16925597871c77a61e716abd
    
<http://code.qt.io/cgit/qt/qtbase.git/commit/src/corelib/io/qprocess_win.cpp?id=bec2fc19fd18768b16925597871c77a61e716abd>




    2017-01-26 12:00 GMT+01:00 Günter Michel <[email protected]
    <mailto:[email protected]>>:
    >
    > In Qt5.7 starting a detached console works fine.
    >
    > void MainWindow::start()
    >
    > {
    >
    >     QProcess p;
    >
    >     QStringList args;
    >
    >     args << "/k";
    >
    >     p.startDetached("cmd", args);
    >
    > }
    >
    > In Qt5.8 Process 'cmd /k' is started, but no console window is
    shown.
    >
    > Any suggestions?
    >
    >
    >
    > _______________________________________________
    > Interest mailing list
    > [email protected] <mailto:[email protected]>
    > http://lists.qt-project.org/mailman/listinfo/interest
    <http://lists.qt-project.org/mailman/listinfo/interest>
    >




_______________________________________________
Interest mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/interest
To restore the 5.7 behaviour i tried to do this like the documentation suggests

p.setCreateProcessArgumentsModifier([](QProcess::CreateProcessArguments*args)

{

args->flags|=CREATE_NEW_CONSOLE;

args->startupInfo->dwFlags&=~STARTF_USESTDHANDLES;

args->startupInfo->dwFlags|=STARTF_USEFILLATTRIBUTE;

args->startupInfo->dwFillAttribute=BACKGROUND_BLUE|FOREGROUND_RED

|FOREGROUND_INTENSITY;

});

but the function won't be called.

--
MES Industrieautomation GmbH
Simmershäuser Straße 102D
D-34125 Kassel

Tel.  0049(0561) 813004
Fax   0049(0561) 813005
Mobil +49 172 9822485
E-mail: [email protected]
http:// [email protected]

Registergericht: Amtsgericht Kassel HRB5618

Geschäftsführer: Ralf Brüne
                 Günter Michel
                 Axel Rosenthal
                 Manfred Stangl

_______________________________________________
Interest mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to