Pages
API Documentation
On this page

KBusyIndicatorWidget Class

Rotating spinning icon to indicate busyness. More...

  • Header: #include <KBusyIndicatorWidget>
  • CMake: find_package(KF6 REQUIRED COMPONENTS WidgetsAddons)
    target_link_libraries(mytarget PRIVATE KF6::WidgetsAddons)
  • Inherits: QWidget

List of all members, including inherited members

Properties

Public Functions

Public Slots

Detailed Description

When you need to communicate to the user that your application is busy with something you'll want to use a KBusyIndicatorWidget to display an spinnning indicator icon. The spinning animation can be stopped and started.

A way of using this widget is to combine it with a QLabel to construct a status line:

auto layout = new QHBoxLayout;
layout->addWidget(new KBusyIndicatorWidget);
layout->addWidget(new QLabel(QStringLiteral("Watering the flowers...")));

The KBusyIndicatorWidget differs from the KPixmapSequenceWidget by animating a scaled icon instead of rendering a pixmap sequence. It supports multiple, semi-arbitrary sizes, with quality constrained only by the resolution of the available icons.

Property Documentation

isRunning : bool

Access functions:

Member Function Documentation

[explicit] KBusyIndicatorWidget::KBusyIndicatorWidget(QWidget *parent = nullptr)

Create a new KBusyIndicatorWidget widget

[since 6.11.0] bool KBusyIndicatorWidget::isRunning() const

Returns whether the spinning animation is running

Note: Getter function for property isRunning.

This function was introduced in Qt 6.11.0.

See also setRunning()

[override virtual] QSize KBusyIndicatorWidget::minimumSizeHint() const

Reimplements an access function for property: QWidget::minimumSizeHint.

Return the smallest reasonable size for the widget

[slot, since 6.11.0] void KBusyIndicatorWidget::setRunning(const bool enable = true)

By calling this method with @p enable = true the spinning abnimation will be started. Stopped if false.

Note: Setter function for property isRunning.

This function was introduced in Qt 6.11.0.

See also isRunning(), start(), stop()

[slot, since 6.10.0] void KBusyIndicatorWidget::start()

Start the spinning animation

This function was introduced in Qt 6.10.0.

See also setRunning()

[slot, since 6.10.0] void KBusyIndicatorWidget::stop()

Stop the spinning animation

This function was introduced in Qt 6.10.0.

See also setRunning()

We use cookies to personalize content and to analyze our traffic. Please decide if you are willing to accept cookies from our website.