mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-29 22:55:56 +08:00
update
This commit is contained in:
parent
91a692484f
commit
bf074da658
@ -224,8 +224,9 @@ void FluFramelessHelper::componentComplete(){
|
|||||||
if(!window.isNull()){
|
if(!window.isNull()){
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
#if (QT_VERSION == QT_VERSION_CHECK(6, 5, 3))
|
#if (QT_VERSION == QT_VERSION_CHECK(6, 5, 3))
|
||||||
window->setFlags(window->flags() | Qt::FramelessWindowHint | Qt::WindowMinimizeButtonHint);
|
window->setFlag(Qt::FramelessWindowHint,true);
|
||||||
#endif
|
#endif
|
||||||
|
window->setFlag(Qt::WindowMinimizeButtonHint,true);
|
||||||
_nativeEvent =new FramelessEventFilter(this);
|
_nativeEvent =new FramelessEventFilter(this);
|
||||||
qApp->installNativeEventFilter(_nativeEvent);
|
qApp->installNativeEventFilter(_nativeEvent);
|
||||||
HWND hwnd = reinterpret_cast<HWND>(window->winId());
|
HWND hwnd = reinterpret_cast<HWND>(window->winId());
|
||||||
|
@ -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/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/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/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/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/FluText.qml"),uri,major,minor,"FluText");
|
||||||
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluTextBox.qml"),uri,major,minor,"FluTextBox");
|
qmlRegisterType(QUrl("qrc:/qt/qml/FluentUI/Controls/FluTextBox.qml"),uri,major,minor,"FluTextBox");
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
import Qt.labs.qmlmodels 1.0
|
|
||||||
|
|
||||||
TableModelColumn{
|
|
||||||
|
|
||||||
}
|
|
@ -13,19 +13,17 @@ Rectangle {
|
|||||||
color: FluTheme.dark ? Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(251/255,251/255,253/255,1)
|
color: FluTheme.dark ? Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(251/255,251/255,253/255,1)
|
||||||
onColumnSourceChanged: {
|
onColumnSourceChanged: {
|
||||||
if(columnSource.length!==0){
|
if(columnSource.length!==0){
|
||||||
var com_column = Qt.createComponent("FluTableModelColumn.qml")
|
var columns= []
|
||||||
if (com_column.status === Component.Ready) {
|
var header_rows = {}
|
||||||
var columns= []
|
columnSource.forEach(function(item){
|
||||||
var header_rows = {}
|
var column = Qt.createQmlObject('import Qt.labs.qmlmodels 1.0;TableModelColumn{}',table_model);
|
||||||
columnSource.forEach(function(item){
|
column.display = item.dataIndex
|
||||||
var column = com_column.createObject(table_model,{display:item.dataIndex});
|
columns.push(column)
|
||||||
columns.push(column)
|
header_rows[item.dataIndex] = item.title
|
||||||
header_rows[item.dataIndex] = item.title
|
})
|
||||||
})
|
table_model.columns = columns
|
||||||
table_model.columns = columns
|
header_model.columns = columns
|
||||||
header_model.columns = columns
|
d.header_rows = [header_rows]
|
||||||
d.header_rows = [header_rows]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
QtObject{
|
QtObject{
|
||||||
|
@ -75,7 +75,6 @@ FluSlider 1.0 Controls/FluSlider.qml
|
|||||||
FluSpinBox 1.0 Controls/FluSpinBox.qml
|
FluSpinBox 1.0 Controls/FluSpinBox.qml
|
||||||
FluStatusView 1.0 Controls/FluStatusView.qml
|
FluStatusView 1.0 Controls/FluStatusView.qml
|
||||||
FluTabView 1.0 Controls/FluTabView.qml
|
FluTabView 1.0 Controls/FluTabView.qml
|
||||||
FluTableModelColumn 1.0 Controls/FluTableModelColumn.qml
|
|
||||||
FluTableView 1.0 Controls/FluTableView.qml
|
FluTableView 1.0 Controls/FluTableView.qml
|
||||||
FluText 1.0 Controls/FluText.qml
|
FluText 1.0 Controls/FluText.qml
|
||||||
FluTextBox 1.0 Controls/FluTextBox.qml
|
FluTextBox 1.0 Controls/FluTextBox.qml
|
||||||
|
@ -71,7 +71,6 @@
|
|||||||
<file>FluentUI/Controls/FluSpinBox.qml</file>
|
<file>FluentUI/Controls/FluSpinBox.qml</file>
|
||||||
<file>FluentUI/Controls/FluStaggeredView.qml</file>
|
<file>FluentUI/Controls/FluStaggeredView.qml</file>
|
||||||
<file>FluentUI/Controls/FluStatusView.qml</file>
|
<file>FluentUI/Controls/FluStatusView.qml</file>
|
||||||
<file>FluentUI/Controls/FluTableModelColumn.qml</file>
|
|
||||||
<file>FluentUI/Controls/FluTableView.qml</file>
|
<file>FluentUI/Controls/FluTableView.qml</file>
|
||||||
<file>FluentUI/Controls/FluTabView.qml</file>
|
<file>FluentUI/Controls/FluTabView.qml</file>
|
||||||
<file>FluentUI/Controls/FluText.qml</file>
|
<file>FluentUI/Controls/FluText.qml</file>
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
import Qt.labs.qmlmodels
|
|
||||||
|
|
||||||
TableModelColumn{
|
|
||||||
|
|
||||||
}
|
|
@ -14,19 +14,17 @@ Rectangle {
|
|||||||
color: FluTheme.dark ? Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(251/255,251/255,253/255,1)
|
color: FluTheme.dark ? Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(251/255,251/255,253/255,1)
|
||||||
onColumnSourceChanged: {
|
onColumnSourceChanged: {
|
||||||
if(columnSource.length!==0){
|
if(columnSource.length!==0){
|
||||||
var com_column = Qt.createComponent("FluTableModelColumn.qml")
|
var columns= []
|
||||||
if (com_column.status === Component.Ready) {
|
var header_rows = {}
|
||||||
var columns= []
|
columnSource.forEach(function(item){
|
||||||
var header_rows = {}
|
var column = Qt.createQmlObject('import Qt.labs.qmlmodels;TableModelColumn{}',table_model);
|
||||||
columnSource.forEach(function(item){
|
column.display = item.dataIndex
|
||||||
var column = com_column.createObject(table_model,{display:item.dataIndex});
|
columns.push(column)
|
||||||
columns.push(column)
|
header_rows[item.dataIndex] = item.title
|
||||||
header_rows[item.dataIndex] = item.title
|
})
|
||||||
})
|
table_model.columns = columns
|
||||||
table_model.columns = columns
|
header_model.columns = columns
|
||||||
header_model.columns = columns
|
d.header_rows = [header_rows]
|
||||||
d.header_rows = [header_rows]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
QtObject{
|
QtObject{
|
||||||
|
Loading…
Reference in New Issue
Block a user