Results 1 to 10 of 10

Thread: Solutions for invoking QWhatsThis Mode

  1. #1
    Join Date
    Sep 2008
    Posts
    15

    Default Solutions for invoking QWhatsThis Mode

    Hello -

    We have built an application that has numerous screens - some are QDialogs and some are QMainWindows. The application also consists of a little over a dozen individual executables that are launched from a main executable.

    Our primary platform right now is UNIX (Solaris) but we're also building on Windows.

    We want to make use of QWhatsThis text for an online help solution. The problem - particuarly in Solaris - is that there isn't a "?" at the top of dialogs or main windows to invoke QWhatsThis Mode. We could add a widget that allows the user to invoke QWhatsThis mode but that means adding the widget to hundreds of individual interfaces.

    Is there a solution that would allow us to globally add a function that gives the user the ability to invoke QWhatsThis MODE? (Shift+F1 for example)

    We want the cursor to change so that when a user passes over a widget that has QWhatsThis text, it is obvious that help exists for that widget. Right now, the user can right-click on a widget and get QWhatsThis text if it exists. But the user has no way of knowing if text exists without trial and error. So, we're looking for the best solution for invoking QWhatsThis Mode.

    Appreciate any feedback...

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Solutions for invoking QWhatsThis Mode

    Shift+F1 should work out of the box. If it doesn't you can create a global shortcut that will call QWhatsThis::enterWhatsThisMode().
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Sep 2008
    Posts
    15

    Default Re: Solutions for invoking QWhatsThis Mode

    Quote Originally Posted by wysota View Post
    Shift+F1 should work out of the box. If it doesn't you can create a global shortcut that will call QWhatsThis::enterWhatsThisMode().
    Thank you for the resonse Wysota. As I understand, Shift+F1 works the way it was intended but not the way that we believe is most helpful.

    If your cursor is over a widget that has QWhatsThis text behind it and you hit Shift+F1, then the QWhatsThis text will appear. The problem with this is that the user doesn't know ahead of time if QWhatsThis text exists for the widget.

    Getting into QWhatsThis MODE seems to be the answer, so that the cursor changes as the user passes over widgets.

    I'm not a programmer myself but we have a group of programmers. I will mention your sugestion of "a global shortcut that will call QWhatsThis::enterWhatsThisMode()" and see if we can make this work.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Solutions for invoking QWhatsThis Mode

    Quote Originally Posted by ike View Post
    Getting into QWhatsThis MODE seems to be the answer, so that the cursor changes as the user passes over widgets.
    This is exactly what happens on my system (I'm using Linux though) - Shift+F1 brings up the "what's this" mode and when I move the cursor it changes depending on whether a particular widget has some description associated with it.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Sep 2008
    Posts
    15

    Default Re: Solutions for invoking QWhatsThis Mode

    Quote Originally Posted by wysota View Post
    This is exactly what happens on my system (I'm using Linux though) - Shift+F1 brings up the "what's this" mode and when I move the cursor it changes depending on whether a particular widget has some description associated with it.
    That's very interesting. It would be PERFECT for us if Shift+F1 put the application into QWhatsThis MODE.

    It doesn't seem to work that way in Solaris. The way it seems to work in Solaris is how it's described on the Qt 4.4 pages, where it says:
    http://doc.trolltech.com/4.4/qwhatsthis.html

    QWhatsThis provides a single window with an explanatory text that pops up when the user asks "What's This?". The default way for users to ask the question is to move the focus to the relevant widget and press Shift+F1. The help text appears immediately; it goes away as soon as the user does something else. (Note that if there is a shortcut for Shift+F1, this mechanism will not work.) Some dialogs provide a "?" button that users can click to enter "What's This?" mode; they then click the relevant widget to pop up the "What's This?" window. It is also possible to provide a a menu option or toolbar button to switch into "What's This?" mode.

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Solutions for invoking QWhatsThis Mode

    Maybe that's because I'm using KDE or something... And in fact in some applications I do have the action they are mentioning in the last sentence of the paragraph you quoted. You can use the same action too, it will work exactly the way you want it.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  7. #7
    Join Date
    Sep 2008
    Posts
    15

    Default Re: Solutions for invoking QWhatsThis Mode

    Quote Originally Posted by wysota View Post
    Maybe that's because I'm using KDE or something... And in fact in some applications I do have the action they are mentioning in the last sentence of the paragraph you quoted. You can use the same action too, it will work exactly the way you want it.
    Yes - we could add that action too - but it would mean adding it to many, many windows. I was really hoping for a more global solution.

    I wonder if the behavior for you is the same for both QDialogs and QMainWindows ?

  8. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Solutions for invoking QWhatsThis Mode

    Quote Originally Posted by ike View Post
    Yes - we could add that action too - but it would mean adding it to many, many windows. I was really hoping for a more global solution.
    It's enough to install an event filter on the application object and intercept Shift+F1. Then you can toggle the what's this mode.

    And if I'm right you don't even need that. If you set up an application global shortcut and add it to any window, it should stay active for all others too - see QShortcut::context.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  9. #9
    Join Date
    Sep 2008
    Posts
    15

    Default Re: Solutions for invoking QWhatsThis Mode

    Quote Originally Posted by wysota View Post
    It's enough to install an event filter on the application object and intercept Shift+F1. Then you can toggle the what's this mode.

    And if I'm right you don't even need that. If you set up an application global shortcut and add it to any window, it should stay active for all others too - see QShortcut::context.
    One of our developers just created a test executable with the global shortcut for Shift+F1 and it worked perfectly. It appears to be very easy to apply this throughout our product.

    Many thanks for your time and suggestions !

  10. #10
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Solutions for invoking QWhatsThis Mode

    No problem. That's what we're here for
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.