Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "fix: qapitrace open file crash" #206

Merged
merged 1 commit into from
Dec 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions styleplugins/chameleon/chameleonstyle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,9 @@ void ChameleonStyle::drawPrimitive(QStyle::PrimitiveElement pe, const QStyleOpti

//QTreeView的绘制复制了QCommonStyle的代码,添加了圆角的处理,hover的处理
if (qobject_cast<const QTreeView *>(w)) {
const auto &delegate = *qobject_cast<const QTreeView *>(w)->itemDelegate();
//如果QTreeView使用的不是默认代理 QStyledItemDelegate,则采取DStyle的默认绘制(备注:这里的QtCreator不会有hover效果和圆角)
if (!qobject_cast<QStyledItemDelegate *>(qobject_cast<const QTreeView *>(w)->itemDelegate())) {
if (typeid(delegate) != typeid(QStyledItemDelegate)) {
break;
}

Expand Down Expand Up @@ -575,8 +576,9 @@ void ChameleonStyle::drawPrimitive(QStyle::PrimitiveElement pe, const QStyleOpti
}
//这里QTreeView的绘制复制了QCommonStyle的代码,添加了圆角的处理,hover的处理
if (qobject_cast<const QTreeView *>(w)) {
const auto &delegate = *qobject_cast<const QTreeView *>(w)->itemDelegate();
//如果QTreeView使用的不是默认代理 QStyledItemDelegate,则采取DStyle的默认绘制(备注:这里的QtCreator不会有hover效果和圆角)
if (!qobject_cast<QStyledItemDelegate *>(qobject_cast<const QTreeView *>(w)->itemDelegate())) {
if (typeid(delegate) != typeid(QStyledItemDelegate)) {
break;
}

Expand Down