Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Brainstorm
  4. revealing advanced user options

revealing advanced user options

Scheduled Pinned Locked Moved Solved Brainstorm
5 Posts 4 Posters 774 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.
  • mzimmersM Offline
    mzimmersM Offline
    mzimmers
    wrote on last edited by
    #1

    Hi all -

    I'd like to add some functionality to an app that is best left to the "super-user." It's not security-sensitive; just some advanced functions that are probably best when not easily accessed by everyone.

    Something like revealing a push button when a combination of keys is held down would work nicely. I've been experimenting with the QKeyEvent class, but I can't get it to work the way I want.

    Does this seem like a reasonable approach in theory? If so, I'll post some specific questions in General.

    Thanks...

    J.HilkJ JonBJ 2 Replies Last reply
    0
    • mzimmersM mzimmers

      Hi all -

      I'd like to add some functionality to an app that is best left to the "super-user." It's not security-sensitive; just some advanced functions that are probably best when not easily accessed by everyone.

      Something like revealing a push button when a combination of keys is held down would work nicely. I've been experimenting with the QKeyEvent class, but I can't get it to work the way I want.

      Does this seem like a reasonable approach in theory? If so, I'll post some specific questions in General.

      Thanks...

      J.HilkJ Offline
      J.HilkJ Offline
      J.Hilk
      Moderators
      wrote on last edited by
      #2

      @mzimmers said in revealing advanced user options:

      Does this seem like a reasonable approach in theory?

      to me yes,
      You may or may not be able to play snake in most of my applications, if you press the correct key sequence.

      😎


      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


      Q: What's that?
      A: It's blue light.
      Q: What does it do?
      A: It turns blue.

      1 Reply Last reply
      1
      • sierdzioS Offline
        sierdzioS Offline
        sierdzio
        Moderators
        wrote on last edited by sierdzio
        #3

        Yes it's a sane approach, and quite common. You'll need to make sure your super users will know about this secret combination of keys. And, if you are developing an app for somebody else, make sure they know about it. Some companies have strict policies against hidden features.

        Is this a QWidget app or QML?

        Some ideas how to "hide" a feature:

        • reveal it after triple-clicking on some label or button (there is a precedent: enabling developer mode on Android)
        • secret combination (in QML it's easy to achieve with Shortcut component, in widgets you can use QShortcut)
        • use a configuration file (QSettings) - you likely already have a config file, so just add another boolean flag in there. Disabled by default, advanced users are probably poking around your config files anyway, so they are likely to find it :-)
        • if it's really only for system-level admins, then you can detect if app is running with admin permissions (no API for this in Qt, unfortunately, you need to implement your own, per-platform solution) and show the feature then

        (Z(:^

        1 Reply Last reply
        2
        • mzimmersM mzimmers

          Hi all -

          I'd like to add some functionality to an app that is best left to the "super-user." It's not security-sensitive; just some advanced functions that are probably best when not easily accessed by everyone.

          Something like revealing a push button when a combination of keys is held down would work nicely. I've been experimenting with the QKeyEvent class, but I can't get it to work the way I want.

          Does this seem like a reasonable approach in theory? If so, I'll post some specific questions in General.

          Thanks...

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by JonB
          #4

          @mzimmers
          This requires that your users read the help/manual. The other responders here seem quite happy with this approach, clearly you all have customers different from mine because it's rare for my customers to be prepared to read any instructions....!

          Do you not have a menu system where these operations can be added? Or, an "Options" page where admins can enable an "Advanced Admin Mode" preference which causes these buttons to be displayed?

          It appears I seem to be on my own on this one, other than games I am not aware I have used any applications which have "hidden keypresses", but there you are....

          1 Reply Last reply
          4
          • mzimmersM Offline
            mzimmersM Offline
            mzimmers
            wrote on last edited by mzimmers
            #5

            Thanks for the input, guys. Jon makes a good point about the need to convey this "hidden" feature to the user. That said, I might go ahead and try implementing this, simply because I can foresee a lot of good uses for the QKeyEvents. I can always go back and implement something that Jon could live with.

            Thanks again...

            EDIT: QKeyEvents aren't a great solution. It turns out that, on Windows and Linux (but not Mac), holding down keys prevents a button push from signalling. You have to press and release the keys, then push the button. Much clunkier than I'd hoped for.

            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