Jump to content

List Content of "Qt5QWindowIcon" Class


nbg15
 Share

Recommended Posts

Hello everybody,

i've spent hours to google and find out how to get content of scrollable list view of our CMS Software...

i checked it with the "AutotIT window info" tool, but the only things I get are this:

Class: Qt5QWindowIcon
Instance: 18

 

but how can I get list contents of a class like that?

 

I was using AutoIT couple a months ago (but it was a ListView32 box) <-- was easy ;)

 

Thanks for any hints...

 

Rickey

 

P.S: I also checked the AutoIT Editors help pages (Keywords: "Qt5QWindowIcon" "Qt5Q", nut cant find nothing... Thanks!

Edited by nbg15
Link to comment
Share on other sites

I also need some help with this window class. The new Mighty Text desktop app is Qt5QWindowIcon and I can only get SimpleSpy to setfocus to the main window. My experience with SimpleSpy and UIA is very minimal, this is what SimpleSpy gives me.

Mouse position is retrieved 148-185
At least we have an element [MightyText][Qt5QWindowIcon]

Having the following values for all properties: 
Title is: <MightyText>  Class   := <Qt5QWindowIcon> controltype:= <UIA_WindowControlTypeId> ,<50032>    , (0000C370)    57;-8;1317;784
*** Parent Information top down ***
0: Title is: <Desktop>  Class   := <#32769> controltype:= <UIA_PaneControlTypeId>   ,<50033>    , (0000C371)    0;0;1366;768
"Title:=Desktop;controltype:=UIA_PaneControlTypeId;class:=#32769"   


;~ *** Standard code ***
#include "UIAWrappers.au3"
AutoItSetOption("MustDeclareVars", 1)

_UIA_setVar("MightyText.mainwindow","title:=MightyText;classname:=Qt5QWindowIcon")
_UIA_action("MightyText.mainwindow","setfocus")


*** Detailed properties of the highlighted element ***
UIA_title:= <MightyText>
UIA_text:= <MightyText>
UIA_regexptitle:= <MightyText>
UIA_class:= <Qt5QWindowIcon>
UIA_regexpclass:= <Qt5QWindowIcon>
UIA_iaccessiblechildId:= <0>
UIA_handle:= <2495118>
UIA_RuntimeId:= <42;2495118>
UIA_BoundingRectangle:= <57;-8;1317;784>
UIA_ProcessId:= <4636>
UIA_ControlType:= <50032>
UIA_LocalizedControlType:= <window>
UIA_Name:= <MightyText>
UIA_HasKeyboardFocus:= <True>
UIA_IsKeyboardFocusable:= <True>
UIA_IsEnabled:= <True>
UIA_ClassName:= <Qt5QWindowIcon>
UIA_Culture:= <0>
UIA_IsControlElement:= <True>
UIA_IsContentElement:= <True>
UIA_IsPassword:= <False>
UIA_NativeWindowHandle:= <2495118>
UIA_IsOffscreen:= <False>
UIA_Orientation:= <0>
UIA_FrameworkId:= <Win32>
UIA_IsRequiredForForm:= <False>
UIA_IsDockPatternAvailable:= <False>
UIA_IsExpandCollapsePatternAvailable:= <False>
UIA_IsGridItemPatternAvailable:= <False>
UIA_IsGridPatternAvailable:= <False>
UIA_IsInvokePatternAvailable:= <False>
UIA_IsMultipleViewPatternAvailable:= <False>
UIA_IsRangeValuePatternAvailable:= <False>
UIA_IsScrollPatternAvailable:= <False>
UIA_IsScrollItemPatternAvailable:= <False>
UIA_IsSelectionItemPatternAvailable:= <False>
UIA_IsSelectionPatternAvailable:= <False>
UIA_IsTablePatternAvailable:= <False>
UIA_IsTableItemPatternAvailable:= <False>
UIA_IsTextPatternAvailable:= <False>
UIA_IsTogglePatternAvailable:= <False>
UIA_IsTransformPatternAvailable:= <True>
UIA_IsValuePatternAvailable:= <False>
UIA_IsWindowPatternAvailable:= <True>
UIA_ValueIsReadOnly:= <True>
UIA_RangeValueValue:= <0>
UIA_RangeValueIsReadOnly:= <True>
UIA_RangeValueMinimum:= <0>
UIA_RangeValueMaximum:= <0>
UIA_RangeValueLargeChange:= <0>
UIA_RangeValueSmallChange:= <0>
UIA_ScrollHorizontalScrollPercent:= <0>
UIA_ScrollHorizontalViewSize:= <100>
UIA_ScrollVerticalScrollPercent:= <0>
UIA_ScrollVerticalViewSize:= <100>
UIA_ScrollHorizontallyScrollable:= <False>
UIA_ScrollVerticallyScrollable:= <False>
UIA_SelectionCanSelectMultiple:= <False>
UIA_SelectionIsSelectionRequired:= <False>
UIA_GridRowCount:= <0>
UIA_GridColumnCount:= <0>
UIA_GridItemRow:= <0>
UIA_GridItemColumn:= <0>
UIA_GridItemRowSpan:= <1>
UIA_GridItemColumnSpan:= <1>
UIA_DockDockPosition:= <5>
UIA_ExpandCollapseExpandCollapseState:= <3>
UIA_MultipleViewCurrentView:= <0>
UIA_WindowCanMaximize:= <True>
UIA_WindowCanMinimize:= <True>
UIA_WindowWindowVisualState:= <1>
UIA_WindowWindowInteractionState:= <2>
UIA_WindowIsModal:= <False>
UIA_WindowIsTopmost:= <False>
UIA_SelectionItemIsSelected:= <False>
UIA_TableRowOrColumnMajor:= <2>
UIA_ToggleToggleState:= <2>
UIA_TransformCanMove:= <False>
UIA_TransformCanResize:= <False>
UIA_TransformCanRotate:= <False>
UIA_IsLegacyIAccessiblePatternAvailable:= <True>
UIA_LegacyIAccessibleChildId:= <0>
UIA_LegacyIAccessibleName:= <MightyText>
UIA_LegacyIAccessibleRole:= <10>
UIA_LegacyIAccessibleState:= <1048580>
UIA_IsDataValidForForm:= <False>
UIA_ProviderDescription:= <[pid:464,hwnd:0x26128E Main:Nested [pid:4636,hwnd:0x26128E Annotation(parent link):Microsoft: Annotation Proxy (unmanaged:uiautomationcore.dll); Main:Microsoft: MSAA Proxy (unmanaged:uiautomationcore.dll)]; Nonclient:Microsoft: Non-Client Proxy (unmanaged:uiautomationcore.dll); Hwnd(parent link):Microsoft: HWND Proxy (unmanaged:uiautomationcore.dll)]>
UIA_IsItemContainerPatternAvailable:= <False>
UIA_IsVirtualizedItemPatternAvailable:= <False>
UIA_IsSynchronizedInputPatternAvailable:= <False>

 

If @error Then
    MsgBox(262192, "", @ComputerName & " slaps " & @UserName & " around a bit with a large trout!")
EndIf

"Yeah yeah yeah patience, how long will that take?"  -Ed Gruberman

REAL search results  |  SciTE4AutoIt3 Editor Full Version

Link to comment
Share on other sites

@NBG15: post simplespy output of your controls to give in indication if it can or cannot work

In general IUIAutomation supports accessibility of QT Widgets

However if the developers of your app are not nice to people with disabilities they forget to use the relevant QT Widget properties for accessbility. 

Check with a trial of Ranorex tooling but I think mightydesktop for sure is not behaving nice (I checked with NVDA and Simplespy and RanorexSpy and inpspect)

http://www.ranorex.com/blog/enabling-automation-for-custom-qt-widgets-by-adding-accessibility#trying

So all you can do is complain or sue the developers of mightydesktop not building accessible apps

 

edit: Its not about the QT class but about the QT Class properties developers are forgettng to give a value

edit2: Testcomplete seems to support more with injecting dlls into the qt application under test

https://support.smartbear.com/downloads/testcomplete/qt-modules/

Edited by junkew
Link to comment
Share on other sites

More interesting 

http://osxr.org:8080/qt/source/qtbase/src/plugins/platforms/windows/qtwindowsglobal.h

0198     case WM_GETOBJECT:
0199         return QtWindows::AccessibleObjectFromWindowRequest;
#include <APISysConstants.au3>
#include <GUIMenu.au3>
#include <WinAPIProc.au3>
#include <WinAPISys.au3>
#include <WindowsConstants.au3>
#include <array.au3>

Example()

Func Example()
    ; Retrieve a list of window handles using a regular expression. The regular expression looks for titles that contain the word SciTE or Internet Explorer.
    Local $aWinList = WinList("[REGEXPTITLE:Mighty.*]")
    $hWnd=$aWinlist[2][1]
    consolewrite($WM_GETOBJECT)
    consolewrite($hwnd)

    _ArrayDisplay($aWinList)
    $result = _SendMessage($hWnd, $WM_GETOBJECT, 0, 0)
    consolewrite($result)

EndFunc   ;==>Example

After trying above and setting the environment variable no result (ranorex, simplespy, inspect, au3inf) but looking thru QT source it should be able to work.

I am on windows 10 so maybe different results on other windows system

edit check source as below

http://osxr.org:8080/qt/source/qtbase/src/plugins/platforms/windows/qwindowscontext.cpp

0052 #ifndef QT_NO_ACCESSIBILITY
0053 # include "accessible/qwindowsaccessibility.h"
0054 #endif
0797     case QtWindows::AccessibleObjectFromWindowRequest:
0798 #ifndef QT_NO_ACCESSIBILITY
0799         return QWindowsAccessibility::handleAccessibleObjectFromWindowRequest(hwnd, wParam, lParam, result);
0800 #else
0801         return false;
0802 #endif
bool QWindowsAccessibility::handleAccessibleObjectFromWindowRequest(HWND hwnd, WPARAM wParam, LPARAM lParam, LRESULT *lResult)
0245 {
0246     if (static_cast<long>(lParam) == static_cast<long>(UiaRootObjectId)) {
0247         /* For UI Automation */
0248     } else if ((DWORD)lParam == DWORD(OBJID_CLIENT)) {
0249         // Start handling accessibility internally
0250         QGuiApplicationPrivate::platformIntegration()->accessibility()->setActive(true);
0251 #if 1
0252         // Ignoring all requests while starting up
0253         // ### Maybe QPA takes care of this???
0254         if (QCoreApplication::startingUp() || QCoreApplication::closingDown())
0255             return false;
0256 #endif
0257 
0258         typedef LRESULT (WINAPI *PtrLresultFromObject)(REFIID, WPARAM, LPUNKNOWN);
0259         static PtrLresultFromObject ptrLresultFromObject = 0;
0260         static bool oleaccChecked = false;
0261 
0262         if (!oleaccChecked) {
0263             oleaccChecked = true;
0264 #if !defined(Q_OS_WINCE)
0265             ptrLresultFromObject = (PtrLresultFromObject)QSystemLibrary::resolve(QLatin1String("oleacc"), "LresultFromObject");
0266 #endif
0267         }
0268 
0269         if (ptrLresultFromObject) {
0270             QWindow *window = QWindowsContext::instance()->findWindow(hwnd);
0271             if (window) {
0272                 QAccessibleInterface *acc = window->accessibleRoot();
0273                 if (acc) {
0274                     if (IAccessible *iface = wrap(acc)) {
0275                         *lResult = ptrLresultFromObject(IID_IAccessible, wParam, iface);  // ref == 2
0276                         if (*lResult) {
0277                             iface->Release(); // the client will release the object again, and then it will destroy itself
0278                         }
0279                         return true;
0280                     }
0281                 }
0282             }
0283         }
0284     }
0285     return false;
0286 }
Edited by junkew
Link to comment
Share on other sites

  • 2 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...