mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2025-07-02 08:05:29 +08:00
update
This commit is contained in:
@ -7,7 +7,7 @@ import FluentUI 1.0
|
||||
|
||||
Window {
|
||||
id:app
|
||||
|
||||
color: "#00000000"
|
||||
Component.onCompleted: {
|
||||
FluApp.setAppWindow(app)
|
||||
FluApp.routes = {
|
||||
|
@ -5,11 +5,15 @@ import QtQuick.Layouts 1.15
|
||||
import QtGraphicalEffects 1.15
|
||||
import FluentUI 1.0
|
||||
|
||||
Rectangle {
|
||||
FluWindow {
|
||||
id:rootwindow
|
||||
width: 800
|
||||
height: 600
|
||||
color : "#F3F3F3"
|
||||
|
||||
FluAppBar{
|
||||
id:appbar
|
||||
title: "FluentUI"
|
||||
}
|
||||
|
||||
ListModel{
|
||||
id:nav_items
|
||||
@ -26,7 +30,7 @@ Rectangle {
|
||||
ListView{
|
||||
id:nav_list
|
||||
anchors{
|
||||
top: parent.top
|
||||
top: appbar.bottom
|
||||
bottom: parent.bottom
|
||||
topMargin: 20
|
||||
bottomMargin: 20
|
||||
@ -75,13 +79,13 @@ Rectangle {
|
||||
}
|
||||
|
||||
Rectangle{
|
||||
color: "#FFFFFF"
|
||||
color: FluApp.isDark ? "#323232" : "#FFFFFF"
|
||||
radius: 10
|
||||
clip: true
|
||||
anchors{
|
||||
left: nav_list.right
|
||||
leftMargin: 2
|
||||
top: parent.top
|
||||
top: appbar.bottom
|
||||
topMargin: 20
|
||||
right: parent.right
|
||||
rightMargin: 10
|
||||
@ -89,7 +93,7 @@ Rectangle {
|
||||
bottomMargin: 20
|
||||
}
|
||||
border.width: 1
|
||||
border.color: "#EEEEEE"
|
||||
border.color: FluApp.isDark ? "#666666" : "#EEEEEE"
|
||||
|
||||
Loader{
|
||||
anchors.fill: parent
|
||||
|
@ -1,11 +1,14 @@
|
||||
import QtQuick 2.15
|
||||
import FluentUI 1.0
|
||||
|
||||
Item {
|
||||
FluWindow {
|
||||
|
||||
width: 500
|
||||
height: 500
|
||||
|
||||
FluAppBar{
|
||||
id:appbar
|
||||
}
|
||||
|
||||
FluText{
|
||||
text:"Display"
|
||||
|
@ -14,24 +14,23 @@ Item {
|
||||
fontStyle: FluText.TitleLarge
|
||||
}
|
||||
|
||||
|
||||
|
||||
FluButton{
|
||||
|
||||
Layout.topMargin: 20
|
||||
onClicked: {
|
||||
FluApp.getWIdByWindow(Window.window)
|
||||
// FluApp.navigate("/Setting")
|
||||
}
|
||||
}
|
||||
|
||||
FluFilledButton{
|
||||
onClicked:{
|
||||
FluApp.navigate("/Setting")
|
||||
console.debug("FluFilledButton:"+Window.window.x)
|
||||
}
|
||||
}
|
||||
|
||||
FluFilledButton{
|
||||
disabled: true
|
||||
onClicked:{
|
||||
console.debug("FluFilledButton-disabled")
|
||||
}
|
||||
}
|
||||
|
||||
@ -39,7 +38,7 @@ Item {
|
||||
Component.onCompleted: {
|
||||
|
||||
}
|
||||
icon:FluentIcons.FA_android
|
||||
icon:FluentIcons.FA_close
|
||||
}
|
||||
|
||||
FluToggleSwitch{
|
||||
|
@ -1,7 +1,6 @@
|
||||
QT += quick
|
||||
CONFIG += c++11
|
||||
|
||||
|
||||
DEFINES += QT_DEPRECATED_WARNINGS QT_NO_WARNING_OUTPUT
|
||||
|
||||
SOURCES += \
|
||||
@ -18,28 +17,28 @@ else: unix:!android: target.path = /opt/$${TARGET}/bin
|
||||
#### 如果你正在使用静态库.a 那么你还需要将下面的配置注释取消掉。
|
||||
#### 其它项目使用方法也是如此。
|
||||
|
||||
DEFINES += STATICLIB
|
||||
# DEFINES += STATICLIB
|
||||
|
||||
LIBNAME = FluentUI
|
||||
# LIBNAME = FluentUI
|
||||
|
||||
CONFIG(debug, debug|release) {
|
||||
contains(QMAKE_HOST.os,Windows) {
|
||||
LIBNAME = FluentUI
|
||||
}else{
|
||||
LIBNAME = FluentUI_debug
|
||||
}
|
||||
}
|
||||
# CONFIG(debug, debug|release) {
|
||||
# contains(QMAKE_HOST.os,Windows) {
|
||||
# LIBNAME = FluentUId
|
||||
# }else{
|
||||
# LIBNAME = FluentUI_debug
|
||||
# }
|
||||
# }
|
||||
|
||||
# Additional import path used to resolve QML modules in Qt Creator's code model
|
||||
QML_IMPORT_PATH = $$OUT_PWD/../bin/
|
||||
# # Additional import path used to resolve QML modules in Qt Creator's code model
|
||||
# QML_IMPORT_PATH = $$OUT_PWD/../bin/
|
||||
|
||||
# Additional import path used to resolve QML modules just for Qt Quick Designer
|
||||
QML_DESIGNER_IMPORT_PATH = $$OUT_PWD/../bin/
|
||||
# # Additional import path used to resolve QML modules just for Qt Quick Designer
|
||||
# QML_DESIGNER_IMPORT_PATH = $$OUT_PWD/../bin/
|
||||
|
||||
INCLUDEPATH += $$OUT_PWD/../bin/FluentUI/
|
||||
DEPENDPATH += $$OUT_PWD/../bin/FluentUI/
|
||||
# INCLUDEPATH += $$OUT_PWD/../bin/FluentUI/
|
||||
# DEPENDPATH += $$OUT_PWD/../bin/FluentUI/
|
||||
|
||||
LIBS += -L$$OUT_PWD/../bin/FluentUI/ -l$${LIBNAME}
|
||||
# LIBS += -L$$OUT_PWD/../bin/FluentUI/ -l$${LIBNAME}
|
||||
# PRE_TARGETDEPS += $$OUT_PWD/../bin/FluentUI/lib$${LIBNAME}.a
|
||||
|
||||
### 注意:静态库 .so .dylib .dll 是自动安装的Qt qml plugin目录中,不需要此步配置
|
||||
|
@ -7,12 +7,9 @@
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QCoreApplication::setAttribute(Qt::AA_UseSoftwareOpenGL);
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
// qputenv("QSG_RENDER_LOOP","basic");
|
||||
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
#endif
|
||||
QGuiApplication app(argc, argv);
|
||||
|
||||
QQmlApplicationEngine engine;
|
||||
#if defined(STATICLIB)
|
||||
FluentUI::create(&engine);
|
||||
|
Reference in New Issue
Block a user