Pages
API Documentation
On this page

KPageWidgetItem Class

KPageWidgetItem is used by KPageWidget and represents a page. More...

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

List of all members, including inherited members

Properties

Public Functions

Public Slots

Signals

Detailed Description

Example:

ColorPage *page = new ColorPage;

KPageWidgetItem *item = new KPageWidgetItem( page, i18n( "Colors" ) );
item->setHeader( i18n( "Colors of Main Window" ) );
item->setIcon( QIcon::fromTheme( "colors" ) );

KPageWidget *pageWidget = new KPageWidget( this );
pageWidget->addPage( item );

Property Documentation

[since 6.6] actions : QList<QAction *>

This property holds the actions associated to the page.

Warning: This is not supported when using a KPageView/KPageWidget/KPageDialog with the Tabbed face type.

This property was introduced in Qt 6.6.

Access functions:

Notifier signal:

checkable : bool

Access functions:

checked : bool

Access functions:

enabled : bool

This property holds whether the item is enabled.

It dis-/enables both the widget and the item in the list-/treeview.

Access functions:

header : QString

Access functions:

headerVisible : bool

Access functions:

icon : QIcon

Access functions:

name : QString

Access functions:

  • QString name() const
  • void setName(const QString &name)

Member Function Documentation

KPageWidgetItem::KPageWidgetItem(QWidget *widget)

Creates a new page widget item.

widget The widget that is shown as page in the KPageWidget.

KPageWidgetItem::KPageWidgetItem(QWidget *widget, const QString &name)

Creates a new page widget item.

widget The widget that is shown as page in the KPageWidget.

name The localized string that is show in the navigation view of the KPageWidget.

[since 6.6] QList<QAction *> KPageWidgetItem::actions() const

Returns the actions associated to the page.

Note: Getter function for property actions.

This function was introduced in Qt 6.6.

See also setActions()

[signal, since 6.6] void KPageWidgetItem::actionsChanged()

This signal is emitted whenever the actions associated to the page are changed.

Note: Notifier signal for property actions.

This function was introduced in Qt 6.6.

[signal] void KPageWidgetItem::changed()

This signal is emitted whenever the icon or header is changed.

Returns the header of the page widget item.

Note: Getter function for property header.

See also setHeader()

QIcon KPageWidgetItem::icon() const

Returns the icon of the page widget item.

Note: Getter function for property icon.

See also setIcon()

bool KPageWidgetItem::isCheckable() const

Returns whether the page widget item is checkable.

Note: Getter function for property checkable.

bool KPageWidgetItem::isChecked() const

Returns whether the page widget item is checked.

Note: Getter function for property checked.

bool KPageWidgetItem::isEnabled() const

Returns whether the page widget item is enabled.

Note: Getter function for property enabled.

bool KPageWidgetItem::isHeaderVisible() const

Returns whether the page will show the header title

Note: Getter function for property headerVisible.

QString KPageWidgetItem::name() const

Returns the name of the page widget item.

Note: Getter function for property name.

See also setName()

[since 6.6] void KPageWidgetItem::setActions(QList<QAction *> actions)

Set the actions associated to the page.

Note: Setter function for property actions.

This function was introduced in Qt 6.6.

See also actions()

void KPageWidgetItem::setCheckable(bool checkable)

Sets whether the page widget item is checkable in the view. checkable True if the page widget is checkable, otherwise false.

Note: Setter function for property checkable.

See also isCheckable()

[slot] void KPageWidgetItem::setChecked(bool checked)

Sets whether the page widget item is checked.

Note: Setter function for property checked.

See also isChecked()

[slot] void KPageWidgetItem::setEnabled(bool)

Sets whether the page widget item is enabled.

Note: Setter function for property enabled.

See also isEnabled()

void KPageWidgetItem::setHeader(const QString &header)

Sets the header of the page widget item.

If setHeader(QString()) is used, what is the default if the header does not got set explicit, then the defined name() will also be used for the header.

header Header of the page widget item.

Note: Setter function for property header.

See also header()

void KPageWidgetItem::setHeaderVisible(bool visible)

Set whether the page should show the header title

Note: Setter function for property headerVisible.

See also isHeaderVisible()

void KPageWidgetItem::setIcon(const QIcon &icon)

Sets the icon of the page widget item. icon Icon of the page widget item.

Note: Setter function for property icon.

See also icon()

void KPageWidgetItem::setName(const QString &name)

Sets the name of the item as shown in the navigation view of the page widget.

Note: Setter function for property name.

See also name()

[signal] void KPageWidgetItem::toggled(bool checked)

This signal is emitted whenever the user checks or unchecks the item of setChecked() is called.

QWidget *KPageWidgetItem::widget() const

Returns the widget of the page widget item.

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