diff -r dee5afe5301f -r 3f74d0d4af4c src/tools/uic/cpp/cppwriteinitialization.cpp --- a/src/tools/uic/cpp/cppwriteinitialization.cpp Mon Mar 15 12:43:09 2010 +0200 +++ b/src/tools/uic/cpp/cppwriteinitialization.cpp Thu Apr 08 14:19:33 2010 +0300 @@ -721,8 +721,9 @@ m_output << m_indent << parentWidget << "->addDockWidget(" << area << varName << ");\n"; } else if (m_uic->customWidgetsInfo()->extends(className, QLatin1String("QStatusBar"))) { m_output << m_indent << parentWidget << "->setStatusBar(" << varName << ");\n"; - } else { - m_output << m_indent << parentWidget << "->setCentralWidget(" << varName << ");\n"; + } else if (!m_uic->customWidgetsInfo()->extends(className, QLatin1String("Q3DockWindow")) + && !m_uic->customWidgetsInfo()->extends(className, QLatin1String("Q3ToolBar"))) { + m_output << m_indent << parentWidget << "->setCentralWidget(" << varName << ");\n"; } }