Results 1 to 19 of 19

Thread: Accessibility in Qt on Vista

  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)

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

    Default Re: Accessibility in Qt on Vista

    Hm, that stinks One should think that it's a requirement for companies which develop software for Governments.

    Btw, I've noticed when using Qt Creator that if you use the mouse to scroll over the menu-items the Narrator reads the items. Unfortunately it doesn't do it for keys.

    Were you able to figure out why Qt Creator has some accessibility and a build for Visual Studio doesn't have any at all?

    -- Bjoern

  20. #14
    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
    Hm, that stinks One should think that it's a requirement for companies which develop software for Governments.
    Yes, I mentioned section 508 to them as well. Will bring it up on the list.

    Btw, I've noticed when using Qt Creator that if you use the mouse to scroll over the menu-items the Narrator reads the items. Unfortunately it doesn't do it for keys.
    Strange, mine doesn't say anything (except for popup start and popup end), either with the mouse or keyboard.

    Were you able to figure out why Qt Creator has some accessibility and a build for Visual Studio doesn't have any at all?
    Not yet. I recompiled Qt with -accessibility and will retest.

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

    bear101 (30th July 2009)

  22. #15
    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

    Just in case you have a static version of Qt, this is what Qt support has to say:

    When you build with this (static) then you need to ensure that you tell qmake that you want to compile in the accessiblity plugin (after it has been built statically) into the application. Firstly you need to go to:

    qt\src\plugins\accessible

    and do:

    mingw32-make

    then add:

    QTPLUGIN += qtaccessiblewidgets

    to your pro file and:

    Q_IMPORT_PLUGIN(qtaccessiblewidgets)

    to your code. See:

    http://doc.trolltech.com/4.5/plugins...static-plugins

    for more information.

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

    bear101 (31st July 2009)

  24. #16
    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

    For shared versions of Qt, they say it should work, but you can try doing just the build part of the previous comment to make sure the plugin gets loaded. I wasn't aware there was a plugin at all, so that might explain some things.

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

    bear101 (31st July 2009)

  26. #17
    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

    Ok, the revelation that the accessibility support is actually a qt plugin solved the problem for me. For my static app I can just link in the plugin, for my shared app (msvc) I just copied the "accessible" directory from the qt plugins dir into the folder my app's exe is in and it worked as well.

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

    bear101 (31st July 2009)

  28. #18
    Join Date
    Sep 2006
    Posts
    19
    Thanks
    12

    Default Re: Accessibility in Qt on Vista

    Thanks a lot for sharing this information from the Qt people! It also works a lot better for me now with accessibility. There's, however, some inconsistencies in what is being said by the Narrator. E.g. drop-lists are said to be editable comboboxes and tree-control items are always said to be leaf nodes with children. But at least the menu items work now and also the control names.

  29. #19
    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
    Thanks a lot for sharing this information from the Qt people! It also works a lot better for me now with accessibility. There's, however, some inconsistencies in what is being said by the Narrator. E.g. drop-lists are said to be editable comboboxes and tree-control items are always said to be leaf nodes with children. But at least the menu items work now and also the control names.
    Was the drop down editable?

    If not, please do report these bugs directly to Nokia.. They're not perfect with their accessibility support, but they do fix bugs when you point out specific examples.
    http://www.qtsoftware.com/developer/task-tracker

    I've also made the QtCreator devs aware of their missing accessibility. Looks like they already had the bug open, and my nagging just reminded them to bump the priority
    http://www.qtsoftware.com/developer/...ntry&id=258007

    Thanks for bringing up the issue.

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

    bear101 (1st August 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.