Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
src_corelib_tools_qtimeline.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3
5...
6progressBar = new QProgressBar(this);
7progressBar->setRange(0, 100);
8
9// Construct a 1-second timeline with a frame range of 0 - 100
10QTimeLine *timeLine = new QTimeLine(1000, this);
13
14// Clicking the push button will start the progress bar animation
15pushButton = new QPushButton(tr("Start animation"), this);
17...
void clicked(bool checked=false)
This signal is emitted when the button is activated (i.e., pressed down then released while the mouse...
The QProgressBar widget provides a horizontal or vertical progress bar.
void setValue(int value)
\inmodule QtCore
Definition qtimeline.h:19
void start()
Starts the timeline.
void frameChanged(int, QPrivateSignal)
QTimeLine emits this signal at regular intervals when in \l Running state, but only if the current fr...
void setFrameRange(int startFrame, int endFrame)
Sets the timeline's frame counter to start at startFrame, and end and endFrame.
QPushButton
[1]
#define tr(X)
QTimeLine * timeLine
connect(timeLine, &QTimeLine::frameChanged, progressBar, &QProgressBar::setValue)