Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Using QProcess to open Google Chrome with arguments
Forum Update on Tuesday, May 27th 2025

Using QProcess to open Google Chrome with arguments

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 4.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Q Offline
    Q Offline
    QtGrocerer
    wrote on 18 Oct 2013, 17:06 last edited by
    #1

    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.

    1 Reply Last reply
    0
    • T Offline
      T Offline
      thEClaw
      wrote on 18 Oct 2013, 17:19 last edited by
      #2

      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";@

      1 Reply Last reply
      0
      • Q Offline
        Q Offline
        QtGrocerer
        wrote on 18 Oct 2013, 17:27 last edited by
        #3

        That did it. Thank you :)

        1 Reply Last reply
        0
        • J Offline
          J Offline
          jollystark012
          Banned
          wrote on 6 Nov 2019, 06:53 last edited by jollystark012 11 Jun 2019, 06:56
          #4
          This post is deleted!
          1 Reply Last reply
          -1

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved