3

As Qt UI controls aren't backed by native controls I can't just send a BN_CLICKED throught SendMessage(). So how do I click on button on a Qt application? I prefer to do it in C# but C and/or C++ solutions are welcome well.

I'm looking for equivalent of this done in win32 API:

SendMessage(btnHandle, BN_CLICKED, 0, IntPtr.Zero);
7
  • 1
    You've already got the answer in the tags: UI Automation. Commented Jul 9, 2016 at 17:27
  • Would you give some code example or a link with some code example to I begin with? I didn't got much luck with my search Commented Jul 9, 2016 at 19:47
  • What I linked to is the detailed documentation for UI Automation with the .NET wrapper classes, complete with code examples. Not sure what else you're looking for. There is plenty of information there to understand how to solve the problem. The next step is writing the code, and this website is not a code-writing service. Commented Jul 10, 2016 at 10:58
  • @CodyGray Qt does not support UI Automation natively, it supports MSAA and IAccessible2. UI automation clients will use a bridge to use a Qt MSAA provider application. The bridge doesn't support IAccessible2, AFAIK. Commented Jul 11, 2016 at 15:53
  • @kuba I'm not entirely sure if I understand your comment. The question is asking about C#, which would imply the .NET Framework, so using UI Automation from Qt is not relevant. So you must be saying that Qt's controls don't work with UI Automation? If so, expletive deleted. I've long felt that Qt was a piece of junk because it didn't use native Win32 controls. But now, if I'm hearing that its crappy non-native controls haven't even been designed to work with UI Automation, then that's completely ridiculous. I do not understand why anyone would ever use Qt. I certainly won't use apps that do. Commented Jul 14, 2016 at 6:09

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.