DtkDeclarative  5.6.10
DTK Declarative module
DialogWindow类 参考

DTK 提供的一种基本对话框窗口. 更多...

类 DialogWindow 继承关系图:

属性

int maxContentHeight
 maxContentHeight 属性是一个只读属性,它表示内容区域的最大高度。 更多...
 
int implicitWidth
 
int implicitHeight
 
alias header
 header 属性用于存储 DialogTitleBar 控件,当需要自定义 DialogTitleBar 时, 可通过 header: DialogTitleBar {} 来实现。
 
string icon
 icon 属性用于存储 DialogWindow 中的图标名称。
 
alias content
 属性表示 DialogWindow 中内容控件 更多...
 
alias palette
 

详细描述

DTK 提供的一种基本对话框窗口.

DialogWindow 是基础的自定义对话框窗口,除窗口内容外,其余部分 DTK 完成实现并提供。 应用可直接在 DialogWindow 中添加需要展示的内容,通过布局的方式对内容进行属性控制。 DialogWindow 继承自 Window 控件,相比于 PopupWindow 窗口,DialogWindow 是 一个独立的窗口。 DialogWindow 实现了 DTK 样式中的无标题,背景模糊的等样式。直接使用 Window 时,这些样式都需要 自定义实现。

属性说明

◆ content

list< QtObject > DialogWindow::content
read

属性表示 DialogWindow 中内容控件

备注
This is the default property

它是 DialogWindow 中的默认控件,使用时无需强制指定 content 属性。 其使用方式如下代码:

width: 200
icon: "music"
ColumnLayout {
width: parent.width
Layout.alignment: Qt.AlignHCenter
font: DTK.fontManager.t5
text: "名称“XXX”已被占用,请使用其他名称"
}
Layout.alignment: Qt.AlignBottom | Qt.AlignHCenter
Layout.bottomMargin: 10
Layout.fillWidth: true
text: "确定"
}
}
}
提供一种行云设计风格的 Button 控件.
Definition: Button.qml:8
提供一个全局的DTK 对象,保证QML中能够获取DTK 的相关枚举和函数.
DTK 提供的一种基本对话框窗口.
Definition: DialogWindow.qml:9
string icon
icon 属性用于存储 DialogWindow 中的图标名称。
Definition: DialogWindow.qml:35
Definition: Label.qml:5

◆ implicitHeight

int DialogWindow::implicitHeight
read
备注
This property is read-only

◆ implicitWidth

int DialogWindow::implicitWidth
read
备注
This property is read-only

◆ maxContentHeight

int DialogWindow::maxContentHeight
read

maxContentHeight 属性是一个只读属性,它表示内容区域的最大高度。

备注
This property is read-only
注解
该属性为只读属性

该类的文档由以下文件生成: