# This script can be loaded in Qt TestCon, and used to script # the hierarchyax project. # # Depends on pywin32 (http://sourceforge.net/projects/pywin32/) # # Instructions: Open testcon, insert the QParentWidget class, # load this script, run "Main()" macro. def Main (): # Create new widget object QParentWidget.createSubWidget("ABC") # Retrieve widget widget = QParentWidget.subWidget("ABC") # Read label property label = widget.label MainWindow.logMacro(0, "Old widget label: "+label, 0, "") # Write label property (throws COM Error: Parameter not optional. (0x-7ffdfff1)) widget.label = "New name"