Skip to content

PythonQt.QtGui.QMovie · declarations 001

Back to PythonQt.QtGui.QMovie

CacheAll instance-attribute

CacheAll: Any

MovieState instance-attribute

MovieState: type

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.

int('0b100', base=0) 4

backgroundColor

backgroundColor() -> Any

X.backgroundColor() -> PythonQt.QtGui.QColor

Supplemental documentation: Qt 5 reference:

QColor QMovie::backgroundColor() const

Returns the background color of the movie. If no background color has been assigned, an invalid QColor is returned.

See also setBackgroundColor().

Upstream PySide2 reference signatures (binding differences may apply):

backgroundColor(self) -> PySide2.QtGui.QColor

Source: https://doc.qt.io/archives/qt-5.15/qmovie.html#backgroundColor

cacheMode instance-attribute

cacheMode: Any

Qt 5 reference:

cacheMode : CacheMode

This property holds the movie's cache mode

Caching frames can be useful when the underlying animation format handler that QMovie relies on to decode the animation data does not support jumping to particular frames in the animation, or even "rewinding" the animation to the beginning (for looping). Furthermore, if the image data comes from a sequential device, it is not possible for the underlying animation handler to seek back to frames whose data has already been read (making looping altogether impossible).

To aid in such situations, a QMovie object can be instructed to cache the frames, at the added memory cost of keeping the frames in memory for the lifetime of the object.

By default, this property is set to CacheNone.

Access functions:

QMovie::CacheMode cacheMode() const
void setCacheMode(QMovie::CacheMode mode)

See also QMovie::CacheMode.

Source: https://doc.qt.io/archives/qt-5.15/qmovie.html#cacheMode

currentFrameNumber

currentFrameNumber() -> int

X.currentFrameNumber() -> int

Supplemental documentation: Qt 5 reference:

int QMovie::currentFrameNumber() const

Returns the sequence number of the current frame. The number of the first frame in the movie is 0.

Upstream PySide2 reference signatures (binding differences may apply):

currentFrameNumber(self) -> int

Source: https://doc.qt.io/archives/qt-5.15/qmovie.html#currentFrameNumber

currentImage

currentImage() -> Any

X.currentImage() -> PythonQt.QtGui.QImage

Supplemental documentation: Qt 5 reference:

QImage QMovie::currentImage() const

Returns the current frame as a QImage.

See also currentPixmap() and updated().

Upstream PySide2 reference signatures (binding differences may apply):

currentImage(self) -> PySide2.QtGui.QImage

Source: https://doc.qt.io/archives/qt-5.15/qmovie.html#currentImage

currentPixmap

currentPixmap() -> Any

X.currentPixmap() -> PythonQt.QtGui.QPixmap

Supplemental documentation: Qt 5 reference:

QPixmap QMovie::currentPixmap() const

Returns the current frame as a QPixmap.

See also currentImage() and updated().

Upstream PySide2 reference signatures (binding differences may apply):

currentPixmap(self) -> PySide2.QtGui.QPixmap

Source: https://doc.qt.io/archives/qt-5.15/qmovie.html#currentPixmap

destroyed

destroyed(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QMovie.destroyed; argument details are not documented.

device

device() -> Any

X.device() -> PythonQt.QtCore.QIODevice

Supplemental documentation: Qt 5 reference:

QIODevice *QMovie::device() const

Returns the device QMovie reads image data from. If no device has currently been assigned, nullptr is returned.

See also setDevice() and fileName().

Upstream PySide2 reference signatures (binding differences may apply):

device(self) -> PySide2.QtCore.QIODevice

Source: https://doc.qt.io/archives/qt-5.15/qmovie.html#device

error

error(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QMovie.error; argument details are not documented.

Supplemental documentation: Qt 5 reference:

[signal] void QMovie::error(QImageReader::ImageReaderError error)

This signal is emitted by QMovie when the error error occurred during playback. QMovie will stop the movie, and enter QMovie::NotRunning state.

See also lastError() and lastErrorString().

Source: https://doc.qt.io/archives/qt-5.15/qmovie.html#error

fileName

fileName() -> str

X.fileName() -> str

Supplemental documentation: Qt 5 reference:

QString QMovie::fileName() const

Returns the name of the file that QMovie reads image data from. If no file name has been assigned, or if the assigned device is not a file, an empty QString is returned.

See also setFileName() and device().

Upstream PySide2 reference signatures (binding differences may apply):

fileName(self) -> str

Source: https://doc.qt.io/archives/qt-5.15/qmovie.html#fileName

finished

finished(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QMovie.finished; argument details are not documented.

Supplemental documentation: Qt 5 reference:

[signal] void QMovie::finished()

This signal is emitted when the movie has finished.

See also QMovie::stop().

Source: https://doc.qt.io/archives/qt-5.15/qmovie.html#finished

format

format() -> Any

X.format() -> PythonQt.QtCore.QByteArray

Supplemental documentation: Qt 5 reference:

QByteArray QMovie::format() const

Returns the format that QMovie uses when decoding image data. If no format has been assigned, an empty QByteArray() is returned.

See also setFormat().

Upstream PySide2 reference signatures (binding differences may apply):

format(self) -> PySide2.QtCore.QByteArray

Source: https://doc.qt.io/archives/qt-5.15/qmovie.html#format

frameChanged

frameChanged(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QMovie.frameChanged; argument details are not documented.

Supplemental documentation: Qt 5 reference:

[signal] void QMovie::frameChanged(int frameNumber)

This signal is emitted when the frame number has changed to frameNumber. You can call currentImage() or currentPixmap() to get a copy of the frame.

This function was introduced in Qt 4.1.

Source: https://doc.qt.io/archives/qt-5.15/qmovie.html#frameChanged

frameCount

frameCount() -> int

X.frameCount() -> int

Supplemental documentation: Qt 5 reference:

int QMovie::frameCount() const

Returns the number of frames in the movie.

Certain animation formats do not support this feature, in which case 0 is returned.

Upstream PySide2 reference signatures (binding differences may apply):

frameCount(self) -> int

Source: https://doc.qt.io/archives/qt-5.15/qmovie.html#frameCount

frameRect

frameRect() -> Any

X.frameRect() -> PythonQt.QtCore.QRect

Supplemental documentation: Qt 5 reference:

QRect QMovie::frameRect() const

Returns the rect of the last frame. If no frame has yet been updated, an invalid QRect is returned.

See also currentImage() and currentPixmap().

Upstream PySide2 reference signatures (binding differences may apply):

frameRect(self) -> PySide2.QtCore.QRect

Source: https://doc.qt.io/archives/qt-5.15/qmovie.html#frameRect

isValid

isValid() -> bool

X.isValid() -> bool

Supplemental documentation: Qt 5 reference:

bool QMovie::isValid() const

Returns true if the movie is valid (e.g., the image data is readable and the image format is supported); otherwise returns false.

For information about why the movie is not valid, see lastError().

Upstream PySide2 reference signatures (binding differences may apply):

isValid(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qmovie.html#isValid

jumpToFrame

jumpToFrame(frameNumber: int) -> bool

X.jumpToFrame(frameNumber) -> bool

Supplemental documentation: Qt 5 reference:

bool QMovie::jumpToFrame(int frameNumber)

Jumps to frame number frameNumber. Returns true on success; otherwise returns false.

Upstream PySide2 reference signatures (binding differences may apply):

jumpToFrame(self, frameNumber: int) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qmovie.html#jumpToFrame

jumpToNextFrame

jumpToNextFrame() -> bool

X.jumpToNextFrame() -> bool

Supplemental documentation: Qt 5 reference:

[slot] bool QMovie::jumpToNextFrame()

Jumps to the next frame. Returns true on success; otherwise returns false.

Upstream PySide2 reference signatures (binding differences may apply):

jumpToNextFrame(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qmovie.html#jumpToNextFrame

loopCount

loopCount() -> int

X.loopCount() -> int

Supplemental documentation: Qt 5 reference:

int QMovie::loopCount() const

Returns the number of times the movie will loop before it finishes. If the movie will only play once (no looping), loopCount returns 0. If the movie loops forever, loopCount returns -1.

Note that, if the image data comes from a sequential device (e.g. a socket), QMovie can only loop the movie if the cacheMode is set to QMovie::CacheAll.

Upstream PySide2 reference signatures (binding differences may apply):

loopCount(self) -> int

Source: https://doc.qt.io/archives/qt-5.15/qmovie.html#loopCount

nextFrameDelay

nextFrameDelay() -> int

X.nextFrameDelay() -> int

Supplemental documentation: Qt 5 reference:

int QMovie::nextFrameDelay() const

Returns the number of milliseconds QMovie will wait before updating the next frame in the animation.

Upstream PySide2 reference signatures (binding differences may apply):

nextFrameDelay(self) -> int

Source: https://doc.qt.io/archives/qt-5.15/qmovie.html#nextFrameDelay

objectNameChanged

objectNameChanged(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QMovie.objectNameChanged; argument details are not documented.

resized

resized(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QMovie.resized; argument details are not documented.

Supplemental documentation: Qt 5 reference:

[signal] void QMovie::resized(const QSize \&size)

This signal is emitted when the current frame has been resized to size. This effect is sometimes used in animations as an alternative to replacing the frame. You can call currentImage() or currentPixmap() to get a copy of the updated frame.

Source: https://doc.qt.io/archives/qt-5.15/qmovie.html#resized

scaledSize

scaledSize() -> Any

X.scaledSize() -> PythonQt.QtCore.QSize

Supplemental documentation: Qt 5 reference:

QSize QMovie::scaledSize()

Returns the scaled size of frames.

This function was introduced in Qt 4.1.

See also setScaledSize() and QImageReader::scaledSize().

Upstream PySide2 reference signatures (binding differences may apply):

scaledSize(self) -> PySide2.QtCore.QSize

Source: https://doc.qt.io/archives/qt-5.15/qmovie.html#scaledSize

setBackgroundColor

setBackgroundColor(color: Any) -> None

X.setBackgroundColor(color)

Supplemental documentation: Qt 5 reference:

void QMovie::setBackgroundColor(const QColor \&color)

For image formats that support it, this function sets the background color to color.

See also backgroundColor().

Upstream PySide2 reference signatures (binding differences may apply):

setBackgroundColor(self, color: PySide2.QtGui.QColor) -> None

Source: https://doc.qt.io/archives/qt-5.15/qmovie.html#setBackgroundColor

setCacheMode

setCacheMode(mode: Any) -> None

X.setCacheMode(mode)

Upstream PySide2 reference signatures (binding differences may apply):

setCacheMode(self, mode: PySide2.QtGui.QMovie.CacheMode) -> None

Source: https://doc.qt.io/archives/qt-5.15/qmovie.html#setCacheMode

setDevice

setDevice(device: Any) -> None

X.setDevice(device)

Supplemental documentation: Qt 5 reference:

void QMovie::setDevice(QIODevice *device)

Sets the current device to device. QMovie will read image data from this device when the movie is running.

See also device() and setFormat().

Upstream PySide2 reference signatures (binding differences may apply):

setDevice(self, device: PySide2.QtCore.QIODevice) -> None

Source: https://doc.qt.io/archives/qt-5.15/qmovie.html#setDevice

setFileName

setFileName(fileName: str) -> None

X.setFileName(fileName)

Supplemental documentation: Qt 5 reference:

void QMovie::setFileName(const QString \&fileName)

Sets the name of the file that QMovie reads image data from, to fileName.

See also fileName(), setDevice(), and setFormat().

Upstream PySide2 reference signatures (binding differences may apply):

setFileName(self, fileName: str) -> None

Source: https://doc.qt.io/archives/qt-5.15/qmovie.html#setFileName

setFormat

setFormat(format: Any) -> None

X.setFormat(format)

Supplemental documentation: Qt 5 reference:

void QMovie::setFormat(const QByteArray \&format)

Sets the format that QMovie will use when decoding image data, to format. By default, QMovie will attempt to guess the format of the image data.

You can call supportedFormats() for the full list of formats QMovie supports.

See also format() and QImageReader::supportedImageFormats().

Upstream PySide2 reference signatures (binding differences may apply):

setFormat(self, format: PySide2.QtCore.QByteArray) -> None

Source: https://doc.qt.io/archives/qt-5.15/qmovie.html#setFormat

setPaused

setPaused(paused: bool) -> None

X.setPaused(paused)

Supplemental documentation: Qt 5 reference:

[slot] void QMovie::setPaused(bool paused)

If paused is true, QMovie will enter Paused state and emit stateChanged(Paused); otherwise it will enter Running state and emit stateChanged(Running).

See also state().

Upstream PySide2 reference signatures (binding differences may apply):

setPaused(self, paused: bool) -> None

Source: https://doc.qt.io/archives/qt-5.15/qmovie.html#setPaused

setScaledSize

setScaledSize(size: Any) -> None

X.setScaledSize(size)

Supplemental documentation: Qt 5 reference:

void QMovie::setScaledSize(const QSize \&size)

Sets the scaled frame size to size.

This function was introduced in Qt 4.1.

See also scaledSize() and QImageReader::setScaledSize().

Upstream PySide2 reference signatures (binding differences may apply):

setScaledSize(self, size: PySide2.QtCore.QSize) -> None

Source: https://doc.qt.io/archives/qt-5.15/qmovie.html#setScaledSize

setSpeed

setSpeed(percentSpeed: int) -> None

X.setSpeed(percentSpeed)

Upstream PySide2 reference signatures (binding differences may apply):

setSpeed(self, percentSpeed: int) -> None

Source: https://doc.qt.io/archives/qt-5.15/qmovie.html#setSpeed

speed instance-attribute

speed: int

Qt 5 reference:

speed : int

This property holds the movie's speed

The speed is measured in percentage of the original movie speed. The default speed is 100%. Example:

QMovie movie("racecar.gif");
movie.setSpeed(200); // 2x speed

Access functions:

int speed() const
void setSpeed(int percentSpeed)

Source: https://doc.qt.io/archives/qt-5.15/qmovie.html#speed

start

start() -> None

X.start()

Supplemental documentation: Qt 5 reference:

[slot] void QMovie::start()

Starts the movie. QMovie will enter Running state, and start emitting updated() and resized() as the movie progresses.

If QMovie is in the Paused state, this function is equivalent to calling setPaused(false). If QMovie is already in the Running state, this function does nothing.

See also stop() and setPaused().

Upstream PySide2 reference signatures (binding differences may apply):

start(self) -> None

Source: https://doc.qt.io/archives/qt-5.15/qmovie.html#start

started

started(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QMovie.started; argument details are not documented.

Supplemental documentation: Qt 5 reference:

[signal] void QMovie::started()

This signal is emitted after QMovie::start() has been called, and QMovie has entered QMovie::Running state.

Source: https://doc.qt.io/archives/qt-5.15/qmovie.html#started

state

state() -> Any

X.state()

Supplemental documentation: Qt 5 reference:

QMovie::MovieState QMovie::state() const

Returns the current state of QMovie.

See also MovieState and stateChanged().

Upstream PySide2 reference signatures (binding differences may apply):

state(self) -> PySide2.QtGui.QMovie.MovieState

Source: https://doc.qt.io/archives/qt-5.15/qmovie.html#state

stateChanged

stateChanged(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QMovie.stateChanged; argument details are not documented.

Supplemental documentation: Qt 5 reference:

[signal] void QMovie::stateChanged(QMovie::MovieState state)

This signal is emitted every time the state of the movie changes. The new state is specified by state.

See also QMovie::state().

Source: https://doc.qt.io/archives/qt-5.15/qmovie.html#stateChanged

stop

stop() -> None

X.stop()

Supplemental documentation: Qt 5 reference:

[slot] void QMovie::stop()

Stops the movie. QMovie enters NotRunning state, and stops emitting updated() and resized(). If start() is called again, the movie will restart from the beginning.

If QMovie is already in the NotRunning state, this function does nothing.

See also start() and setPaused().

Upstream PySide2 reference signatures (binding differences may apply):

stop(self) -> None

Source: https://doc.qt.io/archives/qt-5.15/qmovie.html#stop

supportedFormats

supportedFormats() -> Any

X.supportedFormats()

Supplemental documentation: Qt 5 reference:

[static] QList\<QByteArray> QMovie::supportedFormats()

Returns the list of image formats supported by QMovie.

This function was introduced in Qt 4.1.

See also QImageReader::supportedImageFormats().

Upstream PySide2 reference signatures (binding differences may apply):

supportedFormats() -> typing.List[PySide2.QtCore.QByteArray]

Source: https://doc.qt.io/archives/qt-5.15/qmovie.html#supportedFormats

updated

updated(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtGui.QMovie.updated; argument details are not documented.

Supplemental documentation: Qt 5 reference:

[signal] void QMovie::updated(const QRect \&rect)

This signal is emitted when the rect rect in the current frame has been updated. You can call currentImage() or currentPixmap() to get a copy of the updated frame.

Source: https://doc.qt.io/archives/qt-5.15/qmovie.html#updated