Using QProcess to open Google Chrome with arguments
-
wrote on 18 Oct 2013, 17:06 last edited by
Hi.
I'm trying to open Google chrome with arguments. In the command promt i can write:
@start chrome.exe --chrome-frame -kiosk http://www.google.com@
In order to open Google Chrome in fullscreen. I'm trying to acheive the same thing using QProcess:
@QString program = "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe";
QStringList arguments;
arguments << "--chrome-frame" << "-kiosk http://www.google.com";QProcess *chromeProcess = new QProcess(this);
chromeProcess->start(program, arguments);@It does start a new instance of Chrome, however not in fullscreen. Can someone explain what is wrong with my approach?
Thank you.
-
wrote on 18 Oct 2013, 17:19 last edited by
In the commandline
@-kiosk http://www.google.com@is interpreted as two arguments, since there is a space in between. It is the application that checks if these two follow each other, and then decides to act accordingly.
Therefore the following is certainly wrong, even though I can't test if that's the whole cause of your troubles:
@arguments << "--chrome-frame" << "-kiosk http://www.google.com";@Try this instead:
@arguments << "--chrome-frame" << "-kiosk" << "http://www.google.com";@ -
wrote on 18 Oct 2013, 17:27 last edited by
That did it. Thank you :)
-
Bannedwrote on 6 Nov 2019, 06:53 last edited by jollystark012 11 Jun 2019, 06:56This post is deleted!