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. Ideas for integrated help system with QGraphicsScene & QGraphicsWidget?

Ideas for integrated help system with QGraphicsScene & QGraphicsWidget?

Scheduled Pinned Locked Moved General and Desktop
7 Posts 4 Posters 1.9k 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.
  • S Offline
    S Offline
    starrider78
    wrote on last edited by
    #1

    I'm in charge of finding an integrated help solution for our software that is built using QGraphicsScene and QGraphicsWidget(s). I'm not finding many hits out there.

    I was looking into QHelp, but it looks like it is used primarily for vanilla QtGui applications.

    Does anyone have any suggestions on the best route to take?

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

      Hi and welcome to devnet,

      What do you mean by integrated ? Showed in the scene ?

      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
      • S Offline
        S Offline
        starrider78
        wrote on last edited by
        #3

        Thank you for your response.

        We are envisioning a system that has three possible stages:

        1. In context-specific situations (ie, while on a GraphicsWidget), the ability to hit a key or button to bring up a help widget.

        2. Also in context-sensitive situations, right-clicking on a button/graphics object to get something similar to tool-tip help.

        3. More general help at higher levels that is less context-specific.

        I appreciate you asking the right question here. The requirement comes from an external customer for an "integrated help system." These three specifics are my best guess at how that might look.

        Thank you,
        Ted

        1 Reply Last reply
        0
        • N Offline
          N Offline
          NicuPopescu
          wrote on last edited by
          #4

          you need to know where you are, as you say in which context, and what key/mouse events to treat ... since you have to do this and for qt's native widgets too, I would think to use event filters: a help class inheriting QObject which will be installed as filter from/for any relevant context

          1 Reply Last reply
          0
          • A Offline
            A Offline
            Asperamanca
            wrote on last edited by
            #5

            You could use QGraphicsItem::setData to store either context-sensitive help data or a help context id that can be used to retrieve this data from your central help system. You can also create common base classes for your GraphicsItems, and handle context sensitive help behavior there.

            1 Reply Last reply
            0
            • S Offline
              S Offline
              starrider78
              wrote on last edited by
              #6

              How does one receive a keypress event inside a QGraphicsWidget? When I set the setFocus() in the widget, I don't get the events inside of the event() method.

              1 Reply Last reply
              0
              • A Offline
                A Offline
                Asperamanca
                wrote on last edited by
                #7

                The docs on QGraphicsWidget::event state that it handles only certain types of events.

                For keyboard events:

                -) You can reimplement QGraphicsItem::keyPressEvent and keyReleaseEvent.

                -) You can reimplement QGraphicsItem::sceneEvent and receive the events in there.

                -) You can add sceneEventFilter to the item.

                -) You can install an eventFilter on the QGraphicsView, and catch the events before they are dispatched to the scene

                -) You can install a global events filter.

                It all depends on what exactly you need to do...

                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