Results 1 to 19 of 19

Thread: Accessibility in Qt on Vista

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2006
    Posts
    19
    Thanks
    12

    Default Accessibility in Qt on Vista

    Hi

    I've developed a Windows application in Qt which needs to be accessible to blind users. Previously I've used MFC which works well with screen-readers.

    When I start my Qt application and use a screen-reader, e.g. the Narrator in Vista, it's not able to tell what type of control is currently focused. In MFC it e.g. says that it's an edit-control whereas in my Qt app everything is just a "pane", no matter if it's a combobox or edit control. Also when I activate my menu-bar it just says "menu-bar" and doesn't tell the individual items.

    I've found a few Qt articles on how to develop accessible widgets but how do I use the widgets which are already in place in Qt? Can't Qt tell the narrator what type of control is focused?

    -- Bjoern

  2. #2
    Join Date
    Mar 2007
    Location
    Germany
    Posts
    229
    Thanks
    2
    Thanked 29 Times in 28 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Accessibility in Qt on Vista

    Maybe this helps: http://doc.trolltech.com/4.5/accessible.html. The section "Implementing Accessibility" seems to be the most interesting one.

  3. #3
    Join Date
    Sep 2006
    Posts
    19
    Thanks
    12

    Default Re: Accessibility in Qt on Vista

    But aren't Qt controls already accessible? This looks like reinventing the wheel

  4. #4
    Join Date
    Aug 2006
    Posts
    250
    Thanks
    19
    Thanked 49 Times in 36 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Accessibility in Qt on Vista

    I've just done some testing with Inspect32 on QtCreator, and the results are in fact very disturbing. None of the controls are exposed correctly.

    I've done this testing in the past, found some problems, and Trolltech corrected them, so this is a regression from past versions of Qt. I have a commercial license and will file a bug report.

    UPDATE: I did some testing with Qt demo apps and they work just fine. So it seems QtCreator was compiled without accessibility support. I've reported the bug.
    Last edited by pherthyl; 28th July 2009 at 17:16.

  5. The following user says thank you to pherthyl for this useful post:

    bear101 (28th July 2009)

  6. #5
    Join Date
    Aug 2006
    Posts
    250
    Thanks
    19
    Thanked 49 Times in 36 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Accessibility in Qt on Vista

    Quote Originally Posted by bear101 View Post
    But aren't Qt controls already accessible? This looks like reinventing the wheel
    If the standard controls aren't accessible, check if you compiled your Qt with accessibility support. It is a flag in the configure options. Also check the Qt demos with narrator. they work here, even though creator doesn't.

  7. The following user says thank you to pherthyl for this useful post:

    bear101 (28th July 2009)

  8. #6
    Join Date
    Sep 2006
    Posts
    19
    Thanks
    12

    Default Re: Accessibility in Qt on Vista

    I haven't set the QT_NO_ACCESSIBILITY flag if that's what you're referring to. Also I remember seeing the "accessibility" configuration when I ran ./configure

    But what does one have to do to enable accessibility? If I e.g. use Vista Narrator and start the following example I don't even hear the labels being spoken: C:\Qt\4.5.0\examples\dialogs\findfiles\

    Isn't accessibility just "on" when the application starts? I don't remember doing anything in MFC to enable it.

    -- Bjoern

  9. #7
    Join Date
    Aug 2006
    Posts
    250
    Thanks
    19
    Thanked 49 Times in 36 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Accessibility in Qt on Vista

    Quote Originally Posted by bear101 View Post
    I haven't set the QT_NO_ACCESSIBILITY flag if that's what you're referring to. Also I remember seeing the "accessibility" configuration when I ran ./configure

    But what does one have to do to enable accessibility? If I e.g. use Vista Narrator and start the following example I don't even hear the labels being spoken: C:\Qt\4.5.0\examples\dialogs\findfiles\

    Isn't accessibility just "on" when the application starts? I don't remember doing anything in MFC to enable it.

    -- Bjoern
    Very strange. It seems that with Qt compiled with MSVC accessibility is broken. That would explain why QtCreator doesn't work. I tried some of my GUI apps that are compiled with msvc and they don't work either. The Qt examples work fine, so I assume that mingw compiled exes don't have this problem.

  10. The following user says thank you to pherthyl for this useful post:

    bear101 (29th July 2009)

  11. #8
    Join Date
    Aug 2006
    Posts
    250
    Thanks
    19
    Thanked 49 Times in 36 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Accessibility in Qt on Vista

    It's not MSVC after all. One of my programs that's compiled against a static version of Qt with mingw has the same issue. It just seems that even though configure -help states that -accessibility is the default, it doesn't actually get enabled. Try recompiling your Qt with that flag passsed to configure, and then recompiling your program. I've updated the bug report with this info as well, but haven't tested actually recompiling Qt.

  12. The following user says thank you to pherthyl for this useful post:

    bear101 (29th July 2009)

  13. #9
    Join Date
    Sep 2006
    Posts
    19
    Thanks
    12

    Default Re: Accessibility in Qt on Vista

    Yes, I can see that Qt doesn't add "accessibility" to c:\Qt\4.5.2\mkspecs\default\qmake.conf so I tried adding this myself and recompiled. It, however, didn't help. I also tried to add "accessibility" to my own project's .pro file but it also didn't help.

    Do you know which version of Qt was last able to handle accessibility? Then I'll revert to that version.

    -- Bjoern

  14. #10
    Join Date
    Aug 2006
    Posts
    250
    Thanks
    19
    Thanked 49 Times in 36 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Accessibility in Qt on Vista

    Well it's not that 4.5.2 doesn't support accessibility, it does if you compile against the pre-built Qt in the SDK. However, it seems that recompiling Qt somehow disables that support. I'm going to try to recompile my version of Qt and see if I can get MSAA support to work.

    I got a reply on the bug report, but no solution yet.

    Last time I complained about Qt was 2005-11-16, and shortly afterwards a release came out that seemed to fix the problems I had reported. However that was quite a long time ago, I wouldn't recommend reverting to a version from then.

  15. The following user says thank you to pherthyl for this useful post:

    bear101 (29th July 2009)

  16. #11
    Join Date
    Sep 2006
    Posts
    19
    Thanks
    12

    Default Re: Accessibility in Qt on Vista

    Good luck! And thanks a lot. Please let me know if you find a solution.

    -- Bjoern

  17. #12
    Join Date
    Aug 2006
    Posts
    250
    Thanks
    19
    Thanked 49 Times in 36 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Accessibility in Qt on Vista

    Reply from support:

    Ah, it's clearer what you mean now. I've spoken to one of the Qt Creator developers and accessibility isn't currently supported and there are no plans to include it in future releases of Creator. This could change if there is sufficient interest from other users.
    So Qt Creator is out. Although I can't imagine why they wouldn't at least enable the basic accessibility for the menu items. I'm very disappointed that an accessibility issue should be ignored until there is "sufficient interest from other users". I'm going to post to the Qt-creator list on this issue.

    I've opened another support request to figure out why our apps aren't supporting MSAA.

  18. The following user says thank you to pherthyl for this useful post:

    bear101 (29th July 2009)

Similar Threads

  1. QProcess::startDetached and UAC on Vista
    By serious_jack in forum Qt Programming
    Replies: 2
    Last Post: 24th November 2011, 06:13
  2. Application crash in Vista
    By yj... in forum Installation and Deployment
    Replies: 1
    Last Post: 5th June 2009, 08:18
  3. installing qt in Vista.
    By impeteperry in forum Installation and Deployment
    Replies: 19
    Last Post: 25th February 2009, 19:50
  4. Qt application with vista style
    By ahmad_elhoni in forum Qt Tools
    Replies: 4
    Last Post: 31st October 2008, 14:12
  5. QT 4.3 + vista + QMYSQL
    By ldsjohn in forum Qt Programming
    Replies: 1
    Last Post: 7th August 2007, 07:48

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.