diff --git a/src/tools/uic/cpp/cppwriteinitialization.cpp b/src/tools/uic/cpp/cppwriteinitialization.cpp index 0349061089..570a61a1f1 100644 --- a/src/tools/uic/cpp/cppwriteinitialization.cpp +++ b/src/tools/uic/cpp/cppwriteinitialization.cpp @@ -824,8 +824,8 @@ void WriteInitialization::acceptWidget(DomWidget *node) qPrintable(m_option.messagePrefix()), name.toLatin1().data()); } else { - m_output << m_indent << varName << language::derefPointer << "raise()" - << language::eol; + m_output << m_indent << varName << language::derefPointer + << (language::language() != Language::Python ? "raise()" : "raise_()") << language::eol; } } }