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. How to remove "--help-all" option from the command line help text.
Forum Updated to NodeBB v4.3 + New Features

How to remove "--help-all" option from the command line help text.

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 863 Views
  • 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.
  • R Offline
    R Offline
    Rufledore
    wrote on last edited by
    #1

    Hello,
    I am working on an command line application that uses QCommandLineParser. I use QCommandLineParser::addHelpOption() to make the parser automatically generate a help text that will be returned as a response when -h option is used. Everything works great except for the additional --help-all that is added by addHelpOption() and that I don't want to have here. Also if I run the application with that option (--help-all) it adds "--qmljsdebugger <value>" to the help text, which is an option that I don't want the user to see or know about.
    The application is built in release not debug mode.

    Does anyone know how to remove --help-all and --qmljsebugger from the parser?

    1 Reply Last reply
    0
    • kkoehneK Offline
      kkoehneK Offline
      kkoehne
      Moderators
      wrote on last edited by
      #2

      Instead of using the convenience QCommandLineParser::addHelpOption(), you can also manually add an option for '-h'/ '--help' / '-?' arguments. If this option is set, you then call QCommandLineParser::showHelp().

      Director R&D, The Qt Company

      1 Reply Last reply
      2
      • R Offline
        R Offline
        Rufledore
        wrote on last edited by
        #3

        @kkoehne said in How to remove "--help-all" option from the command line help text.:

        showHelp

        Thank you! That worked. I thought that printHelp() will print the same but it is obviously not.

        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