Skip to content
Snippets Groups Projects
Commit 2659a9b7 authored by Tim Jenssen's avatar Tim Jenssen
Browse files

QmlDesigner: fix stateslistview sizeHint


Change-Id: I86147f80a81ff9095c67bcb296488a2a7345434a
Reviewed-by: default avatarMarco Bubke <marco.bubke@digia.com>
parent c014325d
No related branches found
No related tags found
No related merge requests found
......@@ -34,6 +34,7 @@ import QtQuick.Controls.Styles 1.1
Rectangle {
id: root
height: 136
signal createNewState
signal deleteState(int internalNodeId)
signal duplicateCurrentState
......
......@@ -95,13 +95,12 @@ StatesEditorWidget::StatesEditorWidget(StatesEditorView *statesEditorView, State
connect(m_qmlSourceUpdateShortcut, SIGNAL(activated()), this, SLOT(reloadQmlSource()));
QVBoxLayout *layout = new QVBoxLayout(this);
setMinimumHeight(160);
layout->setMargin(0);
layout->setSpacing(0);
QWidget *container = createWindowContainer(m_quickView.data());
layout->addWidget(container);
m_quickView->setResizeMode(QQuickView::SizeRootObjectToView);
container->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
m_quickView->rootContext()->setContextProperty(QStringLiteral("statesEditorModel"), statesEditorModel);
QColor highlightColor = palette().highlight().color();
......@@ -111,8 +110,6 @@ StatesEditorWidget::StatesEditorWidget(StatesEditorView *statesEditorView, State
m_quickView->rootContext()->setContextProperty("canAddNewStates", true);
setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred));
setWindowTitle(tr("States", "Title of Editor widget"));
// init the first load of the QML UI elements
......@@ -137,11 +134,7 @@ void StatesEditorWidget::reloadQmlSource()
connect(m_quickView->rootObject(), SIGNAL(currentStateInternalIdChanged()), m_statesEditorView.data(), SLOT(synchonizeCurrentStateFromWidget()));
connect(m_quickView->rootObject(), SIGNAL(createNewState()), m_statesEditorView.data(), SLOT(createNewState()));
connect(m_quickView->rootObject(), SIGNAL(deleteState(int)), m_statesEditorView.data(), SLOT(removeState(int)));
m_statesEditorView.data()->synchonizeCurrentStateFromWidget();
setMaximumHeight(m_quickView->initialSize().height());
}
QSize StatesEditorWidget::sizeHint() const
{
return QSize(9999, 159);
}
}
......@@ -56,8 +56,6 @@ public:
StatesEditorWidget(StatesEditorView *m_statesEditorView, StatesEditorModel *statesEditorModel);
virtual ~StatesEditorWidget();
QSize sizeHint() const;
int currentStateInternalId() const;
void setCurrentStateInternalId(int internalId);
void setNodeInstanceView(NodeInstanceView *nodeInstanceView);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment