Results 1 to 5 of 5

Thread: Context sensitive help

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,376
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Context sensitive help

    There is QHelpEvent and QWhatsThisClickedEvent and QAssistantClient. If you want to keep all the help related code in one place, I suggest you do it in the application object as all events pass through QCoreApplication. Global coordinates may help you pinpoint the widget under cursor or you may install an event filter somewhere to gather and handle all help events in one place.

    Of course the simplest way is just to use What's This architecture.

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts

    Default Re: Context sensitive help

    First of all, sorry for not being clear enough.

    I have "what's this" texts and tool tips set all around, but that's not what I was talking about when referring to "context sensitive help". What I was talking about was indeed about using QAssistantClient as providing some more verbal help.

    One could catch for example key press event for F1 at the application level and launch the Assistant and/or switch the page when required. I though creating a QShortcut with key sequence of QKeySequence::HelpContents was the correct cross-platform approach for triggering the help.

    All the context sensitive help related code for finding the correct page in the help documentation is already done at application level, in a QApplication subclass. As mentioned earlier, the correct help page for Assistant is determined according to the current widget (or it's parent / grand parents) containing the focus.

    The only problem is that the slot containing the help functionality in the QApplication subclass is not triggered whenever a modal dialog is active. Otherwise it's working as desired.
    J-P Nurmi

Similar Threads

  1. context menu advice
    By larry104 in forum Qt Programming
    Replies: 3
    Last Post: 7th August 2025, 18:24
  2. Context Menu on QTableWidget
    By ankurjain in forum Qt Programming
    Replies: 9
    Last Post: 17th December 2009, 09:52
  3. help on openGL context
    By mickey in forum Qt Programming
    Replies: 1
    Last Post: 29th March 2006, 19:21
  4. Qt's optimized OpenGL context switching
    By sverhoff in forum Qt Programming
    Replies: 0
    Last Post: 28th March 2006, 16:40
  5. Context OpenGL
    By mickey in forum Qt Programming
    Replies: 4
    Last Post: 3rd March 2006, 21:13

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.