I'm writing some test scripts for a multi-component system. One of the components is a status monitor written with Qt4. Using WinAPI calls, I can get hwnds for all the widgets in the app window, but don't know how to get the text inside the controls. The standard GetWindowText winapi call returns nothing for most of the widgets.

I would like to either

A) Get the various text widgets to respond to the GetWindowText WinAPI function

or

B) Get the widget's text contents through some other method that doesn't involve code changes to the Qt app. This method would be preferable since I'm not the coder for the component in question. Is there a way to get from the hwnd to the QLabel text using only WinAPI calls or perhaps routines from a Qt dll?

Thanks,

Michael