Jump to content
nbg15

List Content of "Qt5QWindowIcon" Class

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

Share this post


Link to post
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>
; 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

>Exit code: 0

REAL search results

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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites
On 2/22/2016 at 3:30 AM, junkew said:

Interesting direction to investigate

Use the QT_USE_NATIVE_WINDOWS=1 in your environment

It worked. But That Application is too lag. When i do something. i have to minimize it. And open it again

Share this post


Link to post
Share on other sites

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

  • Similar Content

    • By ThePoro
      Hi everyone.
      I want to ask about this : 
      I want it runs from 1 to 100 and It opens 10 firefox profiles then access youtube. After I close a firefox window, the loop runs and wait for another window close until loop ends
      I have a loop like this.
      Func launch() Local $from = Int(GUICtrlRead($input1)) Local $to = Int(GUICtrlRead($input2)) If $to <> "" Then While $from <= $to Local $profile = $to _RunDos("start firefox.exe -p " & $profile & " -no-remote youtube.com") $to=$to+1 WEnd Else Local $profile = $to _RunDos("start firefox.exe -p " & $profile & " -no-remote youtube.com") EndIf EndFunc Is there any solution?
      Thank you!
    • By XinYoung
      Greetings!
      I am in need of your guidance once again. I searched the forums for clicking in span, clicking by class, clicking without an ID or Name, etc., but I am unable to find a solution for my problem.
      I am trying to expand this tree in IE. There is an arrow ( > ) that i need to click, but I can't find a way to do it . Alternatively, I can double-click the text "Servers", but that seems to be even more troublesome. I will have to do this 2-3 more times as the tree expands.
      There appears to be an ID for the tree, simply called "tree", but that isn't working when I send a click to it.

      ;Open an IE session and navigate to pgAdmin. Global $oIE = _IECreate($pgAdmin) ;Maximize the IE window. WinSetState(_IEPropertyGet($oIE, "hwnd"), "", @SW_MAXIMIZE) Sleep(2000) ;Expand the tree $oTree = _IEGetObjById($oIE, "tree") _IEAction($oTree, "click") Any ideas?  
    • By Rhidlor
      I was wondering if there was a library or something which provides the capability to Send() to inactive windows, and I know what you're thinking, I could just use ControlSend(); the reason I can't use that in this situation is because I need to hold down keys for specific prolonged periods of time. Also activating the window, Send()ing then de-activating the window isn't really an option here, I need the target window to always be in the background. I've looked around the forums for an adequate amount of time and didn't find anything useful, perhaps because the threads were all 10 years old, nevertheless, if anyone has any suggestions they would be greatly appreciated.
      Thanks!
    • By Pricehacker
      Hello again!
      I have tried searching for quite some time now but couldn´t find a single working way to change the class of your GUI that doesn´t include changing it manually after its compilation.
      First or "AutoIt v3 GUI" is a pretty boring name tbh and i would like to spice it up a bit, also, and more importantly, I would like to identify my windows by something other than its title as it will change depending on some factors and im using two different programs independently as multi threading isn't supported.
      Any help is appreciated! Thank you!
    • By bbProg
      Hi,
       
      how can I wait activate for windows with information as in the photos attached?
      Class is not being recognized by the script.
       
      thanks in advanced.



×
×
  • Create New...