From 4a07ae3e01f10e789d75f6d15451b3c78dbfaea0 Mon Sep 17 00:00:00 2001 From: xibowen Date: Mon, 10 Apr 2023 11:26:01 +0800 Subject: [PATCH] BUGI643S1,fix viewitem select mode in QFiledialog --- ukui-styles/qt5-style-ukui/qt5-ukui-style.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ukui-styles/qt5-style-ukui/qt5-ukui-style.cpp b/ukui-styles/qt5-style-ukui/qt5-ukui-style.cpp index ea3f239..62f0560 100644 --- a/ukui-styles/qt5-style-ukui/qt5-ukui-style.cpp +++ b/ukui-styles/qt5-style-ukui/qt5-ukui-style.cpp @@ -223,6 +223,7 @@ bool Qt5UKUIStyle::eventFilter(QObject *obj, QEvent *e) * Some styleHint() methods are called in the early creation of a widget. * So we can real set them as alpha widgets. */ + int Qt5UKUIStyle::styleHint(QStyle::StyleHint hint, const QStyleOption *option, const QWidget *widget, QStyleHintReturn *returnData) const { realSetWindowSurfaceFormatAlpha(widget); @@ -256,12 +257,11 @@ int Qt5UKUIStyle::styleHint(QStyle::StyleHint hint, const QStyleOption *option, return option ? option->palette.color(QPalette::Active, QPalette::Midlight).rgb() : 0; case SH_ItemView_ActivateItemOnSingleClick: - if(m_is_tablet_mode){ - if(widget) - { - if(widget->topLevelWidget()) - { - if(widget->topLevelWidget()->objectName() == QString::fromUtf8("KyNativeFileDialog")) + if (m_is_tablet_mode) { + if (widget) { + if (widget->topLevelWidget()) { + if (widget->topLevelWidget()->objectName() == QString::fromUtf8("KyNativeFileDialog") || + widget->topLevelWidget()->objectName() == QString::fromUtf8("QFileDialog")) return false; } }