2 Star 3 Fork 3

jerry.xu / Flat.qml

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
main.qml 4.08 KB
一键复制 编辑 原始数据 按行查看 历史
qyvlik 提交于 2017-02-04 22:22 . fix some bug
/*
* author qyvlik
* email qyvlik@qq.com
* time 2015/4/10
*/
import QtQuick 2.4
import QtQuick.Layouts 1.1
import QtQuick.Window 2.2
import QtQuick.Controls 1.3
import FlatUI 2.0
FlatMainWindow {
id:window;
objectName:"MainWindow"
title: qsTr("Flat Example Demo")
width: 960
height: 540
visible:true
// menuBar: MenuBar{
// Menu{
// title:"title"
// }
// }
contentControl.anchors.margins: 20
content: Flow{
id:flow
spacing: 10
FlatButton{ text:"AddTags"; onClicked: { __createExample(text)} }
FlatButton{ text:"CodeEditor"; onClicked: { __createExample(text)} }
FlatButton{ text:"RunningAppliction"; onClicked: { __createExample(text)} }
FlatButton{ text:"ShowMenuInWindow"; onClicked: { __createExample(text)} }
FlatButton{ text:"SampleVideoPlayer"; onClicked: { __createExample(text)} }
FlatButton{ text:"BaiduTranslate"; onClicked: { __createExample(text)} }
FlatButton{ text:"FBIWarning"; onClicked: { __createExample(text)} }
FlatButton{ text:"FloatingWindow"; onClicked: { __createExample(text)} }
FlatButton{ text:"WebBrowser"; onClicked:{ __createExample(text)}}
FlatButton{ text:"Test"; onClicked:{ __createExample(text)}}
FlatButton{ text:"StackViewDemo"; onClicked:{ __createExample(text)}}
FlatButton{ text:"WatchImageOnFullSceen"; onClicked:{ __createExample(text)}}
FlatButton{ text:"GroupBoxDemo"; onClicked:{ __createExample(text)}}
//![error ] Error - RtlWerpReportException failed with status code :-1073741823. Will try to launch the process directly
FlatButton{ text:"ComboBoxDemo";type:FlatGlobal.typeDanger; onClicked:{ __createExample(text)}}
//![error ] Error - RtlWerpReportException failed with status code :-1073741823. Will try to launch the process directly
FlatButton{ text:"HistorySearchDemo"; onClicked:{ __createExample(text)}}
FlatButton{ text:"ButtonType"; onClicked:{ __createExample(text)}}
FlatButton{ text:"YouTuBe"; onClicked:{ __createExample(text)}}
FlatButton{ text:"DoubanClient"; onClicked:{ __createExample(text)}}
FlatButton{ text:"SampleErrorExample"; type:FlatGlobal.typeDanger; onClicked:{ __createExample(text)}}
FlatButton{ text:"FormWindow"; type:FlatGlobal.typeInverse; onClicked:{ __createExample(text)}}
FlatButton{ text:"USBWebClient"; type:FlatGlobal.typeInverse; onClicked:{ __createExample(text)}}
//USBWebClient
FlatButton{ text:"about"; type: FlatGlobal.typeInfo; onClicked: aboutDialog.show()}
FlatButton{ text:"get a image"; type: FlatGlobal.typeWarning; onClicked: FlatGlobal.saveImageToFile(flow,"flow.png")}
}
ErrorDialog{ id:errorDialog; }
FlatDialog{
id:aboutDialog
width: 400
height: 300
title:"About FlatUI and QtQuick"
content:Item{
Column{
spacing:10
Text{
width: parent.width
anchors.margins: 10
wrapMode: Text.WordWrap
text:"look at http://www.bootcss.com/p/flat-ui/ and http://www.qt.io/"
font:FlatGlobal.font
}
Row{
spacing:10
FlatButton{
text:"look FlatUI"
onClicked: Qt.openUrlExternally("http://www.bootcss.com/p/flat-ui");
}
FlatButton{
text:"look QtQuick"
onClicked: Qt.openUrlExternally("http://www.qt.io");
}
}
}
}
}
function __createExample(exampleName){
var elementUrl = Qt.resolvedUrl(String("demo/"+exampleName+"/"+exampleName+".qml"));
var properties = {
x: window.x + 50,
y: window.y + 50
}
FlatGlobal.createQmlObjectFromUrl2(elementUrl, null,
properties, function(win){
win.show();
});
}
}
QML
1
https://gitee.com/xuxincode/Flat.qml.git
git@gitee.com:xuxincode/Flat.qml.git
xuxincode
Flat.qml
Flat.qml
master

搜索帮助