PDA

View Full Version : Role Text for the Widgets



Rakesh_Kumar
1st April 2009, 07:52
Hi all,

For accesibility support I need the role text of the widgets e.g for button role text should be button, for Qlabels it should be label etc. But for all the widgets it's coming as clients.

Previously I was using Qt version 4.3.2 for the devlopment, that time role text was coming perfectly. Now I changed to 4.3.3. I am not sure it's for versioning issue or is there any thing else?

Please help me to resolve the issue.

Thanks and Regards
Rakesh

talk2amulya
1st April 2009, 11:25
what role text are you talking about?

Rakesh_Kumar
1st April 2009, 12:12
Hi,

For providing support of test automation we need to provide the accessibility support for the widgets. e.g in the attached test application there is a pushButton and a combobox.

When you attach the exe with AccExplorer32.exe then it should give the role of the widget.
like buttons for push button and combobox for combo etc.

Yoc can see from the screen shot which I have attached here it's giving as client for the pushbutton but it should give as push button.

Regards
Rakesh

talk2amulya
1st April 2009, 12:46
hmm.. client role comes only when you click on the client area...here the button and combobox are all on the client area..so i guess the pushbutton is not getting selected properly maybe..i dont think there has been any changes in accessiblity features of Qt between 4.3.2 and 4.3.3..so i guess u could try a couple of things here..


add a number of other widgets and see what role comes for them.
try putting these widgets in a frame and put the frame in the mainWindow and again see whats the outcome

Rakesh_Kumar
1st April 2009, 13:29
Hi Amulya,

Thanks alot for your suggestion. I have already tried that but still it's giving the role as client.

You can see from the attahment I have added no of text labels in the frame but still it's giving it as client.

Any further suggestion to resolve this is welcomed.

Regards
Rakesh

talk2amulya
1st April 2009, 13:45
do you mind sending across AccExplorer? I can check it here on 4.4.3 cuz i dont see any other course of action

Rakesh_Kumar
1st April 2009, 14:22
Hi Amulya,

In zip format the size is 249 kb, so I can't attach here. Can you please download (AccExplorer32.exe) from http://www.microsoft.com/downloads/details.aspx?familyid=3755582A-A707-460A-BF21-1373316E13F0&displaylang=en


Regards
Rakesh

talk2amulya
1st April 2009, 14:41
thanks rakesh, i'll have a look into it

talk2amulya
2nd April 2009, 07:43
hey rakesh, i think the Qt version that you are using is not build with accessiblity support. read about QAccessible . Perhaps that will help you resolve the issue

talk2amulya
2nd April 2009, 08:37
Attached are the screenshots showing that in my case, its working fine:

Rakesh_Kumar
2nd April 2009, 10:14
Hi Amulya,

Thanks a lot for your help. I think you are right. Qt version that I am using is not build with accessiblity support.

I tried with the function QAccessible::isActive (), it's returning false to me. I think it should return true to provide accessibility at run time.

Could you please check what this function returns in your case.

And one more request could you please tell me what modifications do I need to do for getting the support for accessibility because I think whatever roles are specified at QAccessible::Role should come automatically for Qwidgets.

Regards
Rakesh

talk2amulya
2nd April 2009, 10:44
Are you using Graphics View framework in your examples?

Rakesh_Kumar
2nd April 2009, 10:56
No I am not usuing Graphics View framework.
The test application I just created by usuing QT designer and in the second one I created the frame and labels dynamically i.e. without usuing designer.

Have you checked in your test application the return of QAccessible::isActive ()?

Regards
Rakesh

talk2amulya
2nd April 2009, 11:04
well i have done a thorough study on this..strangely isActive() returns false for me too..but everything is working fine here..i have tried it on many qt applications, examples etc and it works fine..only problem is when application framework uses graphics view, then it shows just "client"..no other information..and that is EXACTLY whats happening with you..i guess next what we can try is u sending me ur test exe and i can run it on my Qt version...otherwise this seems like a dead end.

Rakesh_Kumar
2nd April 2009, 11:31
Hi Amulya,

Thanks a lot for your help and patience. Please just give it a final try.

I am giving my dll in the attachment. Please register it in regsvr32 and try to run it in a ActiveXTest Container and then you can check the role text for different widget.

I am providing my source code also which is devloped in windows 2005.

Please give it a try.

Regards
Rakesh

talk2amulya
2nd April 2009, 12:59
well, i did as you said..ur control is calendar control 8.0, right? on it, i was able to select different objects and able to get values, but none of them were qt objects..thats weird

Rakesh_Kumar
2nd April 2009, 13:30
No My control name is CxCalendarControl Class.

talk2amulya
2nd April 2009, 13:34
buddy, i can see it all working here..i dont know about the version u r using but not a qt's fault :)