This commit is contained in:
朱子楚\zhuzi 2023-12-28 21:20:47 +08:00
parent 91a692484f
commit bf074da658
8 changed files with 24 additions and 40 deletions

View File

@ -224,8 +224,9 @@ void FluFramelessHelper::componentComplete(){
if(!window.isNull()){
#ifdef Q_OS_WIN
#if (QT_VERSION == QT_VERSION_CHECK(6, 5, 3))
window->setFlags(window->flags() | Qt::FramelessWindowHint | Qt::WindowMinimizeButtonHint);
window->setFlag(Qt::FramelessWindowHint,true);
#endif
window->setFlag(Qt::WindowMinimizeButtonHint,true);
_nativeEvent =new FramelessEventFilter(this);
qApp->installNativeEventFilter(_nativeEvent);
HWND hwnd = reinterpret_cast<HWND>(window->winId());

View File

@ -116,7 +116,6 @@ void FluentUI::registerTypes(const char *uri){
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluSpinBox.qml"),uri,major,minor,"FluSpinBox");
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluStatusView.qml"),uri,major,minor,"FluStatusView");
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluTabView.qml"),uri,major,minor,"FluTabView");
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluTableModelColumn.qml"),uri,major,minor,"FluTableModelColumn");
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluTableView.qml"),uri,major,minor,"FluTableView");
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluText.qml"),uri,major,minor,"FluText");
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluTextBox.qml"),uri,major,minor,"FluTextBox");

View File

@ -1,5 +0,0 @@
import Qt.labs.qmlmodels 1.0
TableModelColumn{
}

View File

@ -13,12 +13,11 @@ Rectangle {
color: FluTheme.dark ? Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(251/255,251/255,253/255,1)
onColumnSourceChanged: {
if(columnSource.length!==0){
var com_column = Qt.createComponent("FluTableModelColumn.qml")
if (com_column.status === Component.Ready) {
var columns= []
var header_rows = {}
columnSource.forEach(function(item){
var column = com_column.createObject(table_model,{display:item.dataIndex});
var column = Qt.createQmlObject('import Qt.labs.qmlmodels 1.0;TableModelColumn{}',table_model);
column.display = item.dataIndex
columns.push(column)
header_rows[item.dataIndex] = item.title
})
@ -27,7 +26,6 @@ Rectangle {
d.header_rows = [header_rows]
}
}
}
QtObject{
id:d
property var currentRow

View File

@ -75,7 +75,6 @@ FluSlider 1.0 Controls/FluSlider.qml
FluSpinBox 1.0 Controls/FluSpinBox.qml
FluStatusView 1.0 Controls/FluStatusView.qml
FluTabView 1.0 Controls/FluTabView.qml
FluTableModelColumn 1.0 Controls/FluTableModelColumn.qml
FluTableView 1.0 Controls/FluTableView.qml
FluText 1.0 Controls/FluText.qml
FluTextBox 1.0 Controls/FluTextBox.qml

View File

@ -71,7 +71,6 @@
<file>FluentUI/Controls/FluSpinBox.qml</file>
<file>FluentUI/Controls/FluStaggeredView.qml</file>
<file>FluentUI/Controls/FluStatusView.qml</file>
<file>FluentUI/Controls/FluTableModelColumn.qml</file>
<file>FluentUI/Controls/FluTableView.qml</file>
<file>FluentUI/Controls/FluTabView.qml</file>
<file>FluentUI/Controls/FluText.qml</file>

View File

@ -1,5 +0,0 @@
import Qt.labs.qmlmodels
TableModelColumn{
}

View File

@ -14,12 +14,11 @@ Rectangle {
color: FluTheme.dark ? Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(251/255,251/255,253/255,1)
onColumnSourceChanged: {
if(columnSource.length!==0){
var com_column = Qt.createComponent("FluTableModelColumn.qml")
if (com_column.status === Component.Ready) {
var columns= []
var header_rows = {}
columnSource.forEach(function(item){
var column = com_column.createObject(table_model,{display:item.dataIndex});
var column = Qt.createQmlObject('import Qt.labs.qmlmodels;TableModelColumn{}',table_model);
column.display = item.dataIndex
columns.push(column)
header_rows[item.dataIndex] = item.title
})
@ -28,7 +27,6 @@ Rectangle {
d.header_rows = [header_rows]
}
}
}
QtObject{
id:d
property var currentRow