diff options
Diffstat (limited to 'doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qtimeline.cpp')
-rw-r--r-- | doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qtimeline.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qtimeline.cpp b/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qtimeline.cpp index 5f2e97853..5b0d16e2e 100644 --- a/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qtimeline.cpp +++ b/doc/codesnippets/doc/src/snippets/code/src_corelib_tools_qtimeline.cpp @@ -6,10 +6,10 @@ progressBar.setRange(0, 100) # Construct a 1-second timeline with a frame range of 0 - 100 timeLine = QTimeLine(1000, self) timeLine.setFrameRange(0, 100) -QObject.connect(timeLine, SIGNAL("frameChanged(int)"), progressBar, SLOT("setValue(int)")) +timeLine.frameChanged[int].connect(progressBar.setValue) # Clicking the push button will start the progress bar animation pushButton = QPushButton(QObject.tr("Start animation"), self) -QObject.connect(pushButton, SIGNAL("clicked()"), timeLine, SLOT("start()")) +pushButton.clicked.connect(timeLine.start) ... //! [0] |