BUGI643S1,fix viewitem select mode in QFiledialog

This commit is contained in:
xibowen 2023-04-10 11:26:01 +08:00
parent e2d03b4b2d
commit 4a07ae3e01
1 changed files with 6 additions and 6 deletions

View File

@ -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;
}
}