From 30f19d904fb3b93f4bb9a17646748b1fca4f286a Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Thu, 11 Jul 2013 06:03:46 +0200 Subject: Check if widget inherits from QTextEdit when drawing the frame There can be cases where the accessibility plugin is not available so rather than have an incorrect style in those cases we check if the widget inherits QTextEdit. Change-Id: Ia514ce61f24ef016f56c6dce103f90f699b4048a Reviewed-by: Jens Bache-Wiig --- src/widgets/styles/qwindowsvistastyle.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/widgets/styles/qwindowsvistastyle.cpp b/src/widgets/styles/qwindowsvistastyle.cpp index b08eab580d..e442e53bde 100644 --- a/src/widgets/styles/qwindowsvistastyle.cpp +++ b/src/widgets/styles/qwindowsvistastyle.cpp @@ -523,10 +523,11 @@ void QWindowsVistaStyle::drawPrimitive(PrimitiveElement element, const QStyleOpt case PE_Frame: { #ifndef QT_NO_ACCESSIBILITY if (QStyleHelper::isInstanceOf(option->styleObject, QAccessible::EditableText) - || QStyleHelper::isInstanceOf(option->styleObject, QAccessible::StaticText)) { + || QStyleHelper::isInstanceOf(option->styleObject, QAccessible::StaticText) || #else - if (false) { + if ( #endif + (widget && widget->inherits("QTextEdit"))) { painter->save(); int stateId = ETS_NORMAL; if (!(state & State_Enabled)) -- cgit v1.2.3