Commit 2908d42b authored by Tim Jenssen's avatar Tim Jenssen

QmlDesigner: keep centralTabWidget for later use

Change-Id: I564e178ba049d963af9a7b5ab8e208c50bcba12c
Reviewed-by: Thomas Hartmann's avatarThomas Hartmann <thomas.hartmann@qt.io>
parent 99723f69
......@@ -516,7 +516,10 @@ QWidget *DesignModeWidget::createCenterWidget()
m_topSideBar = createTopSideBarWidget(viewManager().widgetInfos());
horizontalLayout->addWidget(m_topSideBar.data());
horizontalLayout->addWidget(createCentralSplitter(viewManager().widgetInfos()));
Core::MiniSplitter *centralSplitter = createCentralSplitter(viewManager().widgetInfos());
m_centralTabWidget = centralSplitter->findChild<QTabWidget*>("centralTabWidget");
Q_ASSERT(m_centralTabWidget);
horizontalLayout->addWidget(centralSplitter);
return centerWidget;
}
......@@ -585,6 +588,11 @@ CrumbleBar *DesignModeWidget::crumbleBar() const
return m_crumbleBar;
}
QTabWidget *DesignModeWidget::centralTabWidget() const
{
return m_centralTabWidget;
}
QString DesignModeWidget::contextHelpId() const
{
if (currentDesignDocument())
......
......@@ -34,6 +34,10 @@
#include <QWidget>
#include <QScopedPointer>
QT_BEGIN_NAMESPACE
class QTabWidget;
QT_END_NAMESPACE
namespace Core {
class SideBar;
class SideBarItem;
......@@ -80,6 +84,7 @@ public:
bool gotoCodeWasClicked();
CrumbleBar* crumbleBar() const;
QTabWidget* centralTabWidget() const;
public slots:
void updateErrorStatus(const QList<RewriterError> &errors);
......@@ -107,6 +112,7 @@ private: // functions
private: // variables
QSplitter *m_mainSplitter = nullptr;
QPointer<DocumentWarningWidget> m_warningWidget;
QTabWidget* m_centralTabWidget = nullptr;
QScopedPointer<Core::SideBar> m_leftSideBar;
QScopedPointer<Core::SideBar> m_rightSideBar;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment