SettingsDialog

Search for usage in LXR

SettingsDialog Class Reference
Inheritance diagram for SettingsDialog:

Properties

alias content
 

Public Member Functions

void addPage (component, properties)
 
- Public Member Functions inherited from QtQuick.Loader
 loaded ()
 
object setSource (url source, object properties)
 

Detailed Description

A popup page with a scrollable vertical layout, and support for a stack of multiple pages.

The default container fo this control is a MauiKit SettingsPage, and the popup will snap to the window full size on constrained spaces.

See also
SettingsPage

You can add multiple sub pages to this control by making use of the SettingsPage control and the addPage function. By using the SettingsPage you can expect to have a way to navigate between the control sub pages. The code snippet below shows a quick demo on how to do it.

See also
addPage
Note
This control is mostly use for presenting a group of configuration settings to the user. Usually it is populated with sections SectionGroup containing FlexSectionItem.
Maui.SettingsDialog
{
id: _settingsDialog
Maui.FlexSectionItem
{
label1.text: "SSetting Subpage"
label2.text: "Click me to add a new page"
ToolButton
{
icon.name: "go-next"
checkable: true
onToggled: _settingsDialog.addPage(_settingsPage2)
}
}
Maui.SectionGroup
{
title: "First Section"
Maui.FlexSectionItem
{
label1.text: "Configuration title"
label2.text: "Description text"
Button
{
text: "Test"
}
}
Maui.FlexSectionItem
{
label1.text: "Configuration title"
label2.text: "Description text"
Switch {}
}
Maui.FlexSectionItem
{
label1.text: "Configuration title"
label2.text: "Description text"
Switch {}
}
}
Maui.SectionGroup
{
title: "A Second Section"
Maui.FlexSectionItem
{
label1.text: "Configuration title"
label2.text: "Description text"
Switch {}
}
Maui.FlexSectionItem
{
label1.text: "Configuration title"
label2.text: "Description text"
wide: false
TextField
{
Layout.fillWidth: true
}
}
Maui.FlexSectionItem
{
label1.text: "Configuration title"
label2.text: "Description text"
Switch {}
}
}
Component
{
id: _settingsPage2
Maui.SettingsPage
{
title: "Page2"
Maui.FlexSectionItem
{
label1.text: "Configuration title"
label2.text: "Description text"
Switch {}
}
}
}
}

You can find a more complete example at this link.

Definition at line 125 of file SettingsDialog.qml.

Property Documentation

◆ content

alias SettingsDialog::content
read
Remarks
This is the default property

Definition at line 130 of file SettingsDialog.qml.

Member Function Documentation

◆ addPage()

void SettingsDialog::addPage ( component ,
properties  )

Adds a new sub page to the control.

Use a MauiKit SettingsPage for the component.

Parameters
componentthe QQC2 Component wrapping a MauiKit SettingsPage
propertiesoptional properties map for the newly added sub page component
Note
The optional properties argument specifies a map of initial property values for the pushed item. For dynamically created items, these values are applied before the creation is finalized. This is more efficient than setting property values after creation, particularly where large sets of property values are defined, and also allows property bindings to be set up (using Qt.binding()) before the item is created. Checkout QT documentation on the StackView methods.

The documentation for this class was generated from the following file:
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri May 2 2025 11:57:11 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.