mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-27 05:38:37 +08:00
39 lines
789 B
QML
39 lines
789 B
QML
import QtQuick
|
|
import QtQuick.Layouts
|
|
import QtQuick.Window
|
|
import QtQuick.Controls
|
|
import FluentUI
|
|
|
|
FluExpander{
|
|
|
|
property string code: ""
|
|
|
|
headerText: "Source"
|
|
contentHeight:content.height
|
|
|
|
FluMultilineTextBox{
|
|
id:content
|
|
width:parent.width
|
|
readOnly:true
|
|
text:code
|
|
background:Rectangle{
|
|
color:FluTheme.dark ? Qt.rgba(45/255,45/255,45/255,0.97) : Qt.rgba(237/255,237/255,237/255,0.97)
|
|
}
|
|
}
|
|
|
|
FluIconButton{
|
|
iconSource:FluentIcons.Copy
|
|
anchors{
|
|
right: parent.right
|
|
top: parent.top
|
|
rightMargin: 5
|
|
topMargin: 5
|
|
}
|
|
onClicked:{
|
|
FluApp.clipText(content.text)
|
|
showSuccess("复制成功")
|
|
}
|
|
}
|
|
|
|
}
|