diff options
author | Hugo Parente Lima <hugo.pl@gmail.com> | 2011-08-02 15:50:39 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:54:41 -0300 |
commit | 6c8ad3b83f0694e2b5b2ad7df34e793a69966682 (patch) | |
tree | deb6508c21664c9699d5f6ac05340221990f2181 /PySide/QtCore | |
parent | d7710810050f10b23364ad0507596140b975082f (diff) |
Translate QHistoryState code snippet to Python.
Diffstat (limited to 'PySide/QtCore')
-rw-r--r-- | PySide/QtCore/typesystem_core.xml | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/PySide/QtCore/typesystem_core.xml b/PySide/QtCore/typesystem_core.xml index bf066b938..6791ffbe1 100644 --- a/PySide/QtCore/typesystem_core.xml +++ b/PySide/QtCore/typesystem_core.xml @@ -3070,6 +3070,27 @@ <object-type name="QHistoryState" since="4.6"> <enum-type name="HistoryType" /> + <modify-documentation xpath='description/code'> + <code>machine = QStateMachine() + +s1 = new QState() +s11 = new QState(s1) +s12 = new QState(s1) + +s1h = QHistoryState(s1) +s1h.setDefaultState(s11) + +machine.addState(s1) + +s2 = QState() +machine.addState(s2) + +button = QPushButton() +# Clicking the button will cause the state machine to enter the child state +# that s1 was in the last time s1 was exited, or the history state's default +# state if s1 has never been entered. +s1.addTransition(button.clicked, s1h)</code> + </modify-documentation> </object-type> <value-type name="QMargins" since="4.6"/> |