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. More QCommandLineParser options in custom webengine app
Forum Updated to NodeBB v4.3 + New Features

More QCommandLineParser options in custom webengine app

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 259 Views 3 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.
  • A Offline
    A Offline
    Alexander M. J
    wrote on last edited by Alexander M. J
    #1

    Hi,

    I'm making my own frontend for qtwebengine (a simplebrowser/quicknanobrowser). Currently I need to pass some startup parameters.

    This is my code

    int main(int argc, char** argv) {
      QCommandLineParser parser;
      parser.setApplicationDescription("The Browser");
      parser.addHelpOption();
      parser.addVersionOption();
      QCommandLineOption targetDirectoryOption(
          QStringList() << "i"
                        << "isolation",
          QCoreApplication::translate("main", "Isolate the browser for a certain <domain>."),
          QCoreApplication::translate("main", "domain"));
      parser.addOption(targetDirectoryOption);
      parser.process(app);
      return QApplication::exec();
    

    Now the problem starts when I try to give it extra startup parameters such as --no-sandbox or --remote-debugging-port intended for QtWebEngine. My program stops execution and gives following error:

    browser: Unknown options: remote-debugging-port, disable-features.
    

    How can I both support my startup flags but also keep using the ones intended for webengine/chromium ?

    raven-worxR 1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Your code snippet is incomplete so it's impossible to reproduce your issue.

      In any case, if implemented correctly the additional parameters you pass using the parser should have no influence on the other since they should be pared first.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • A Alexander M. J

        Hi,

        I'm making my own frontend for qtwebengine (a simplebrowser/quicknanobrowser). Currently I need to pass some startup parameters.

        This is my code

        int main(int argc, char** argv) {
          QCommandLineParser parser;
          parser.setApplicationDescription("The Browser");
          parser.addHelpOption();
          parser.addVersionOption();
          QCommandLineOption targetDirectoryOption(
              QStringList() << "i"
                            << "isolation",
              QCoreApplication::translate("main", "Isolate the browser for a certain <domain>."),
              QCoreApplication::translate("main", "domain"));
          parser.addOption(targetDirectoryOption);
          parser.process(app);
          return QApplication::exec();
        

        Now the problem starts when I try to give it extra startup parameters such as --no-sandbox or --remote-debugging-port intended for QtWebEngine. My program stops execution and gives following error:

        browser: Unknown options: remote-debugging-port, disable-features.
        

        How can I both support my startup flags but also keep using the ones intended for webengine/chromium ?

        raven-worxR Offline
        raven-worxR Offline
        raven-worx
        Moderators
        wrote on last edited by
        #3

        @Alexander-M-J said in More QCommandLineParser options in custom webengine app:

        My program stops execution and gives following error:
        browser: Unknown options: remote-debugging-port, disable-features.

        How can I both support my startup flags but also keep using the ones intended for webengine/chromium ?

        did you also provide a value for the parameter?
        https://doc.qt.io/qt-5/qtwebengine-debugging.html#qt-webengine-developer-tools

        --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
        If you have a question please use the forum so others can benefit from the solution in the future

        1 Reply Last reply
        0

        • Login

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