blob: 10c4e0d9efa389fb52e75c3bc42c382b76c005e5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
' Copyright (C) 2016 The Qt Company Ltd.
' SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
' This script can be loaded in Qt TestCon, and used to script
' the hierarchyax project.
'
' Instructions: Open testcon, insert the QParentWidget class,
' load this script, run "Main()" macro.
Sub Main
' Create new widget object
QParentWidget.createSubWidget("ABC")
' Retrieve widget
Set widget = QParentWidget.subWidget("ABC")
' Read label property
label = widget.label
MainWindow.logMacro 0, "Old widget label: "&label, 0, ""
' Write label property
widget.label = "renamed "&label
label = widget.label
MainWindow.logMacro 0, "New widget label: "&label, 0, ""
End Sub
|