QmlDesigner: Fix Component Library header

Hover was not working on LibraryHeader.qml. There seems to be some issues
between QQuickWidget and QML Item. Header width and height are now set with
m_headerWidget instead of root Item.

Fixes: QDS-4387
Change-Id: Ic587be319bb7aa6755fa26f6211ce11eb9795c67
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
This commit is contained in:
Miina Puuronen
2021-05-27 11:34:25 +03:00
parent 9ba5d9d8a8
commit 6caa8cc289
2 changed files with 2 additions and 2 deletions

View File

@@ -32,8 +32,6 @@ import StudioTheme 1.0 as StudioTheme
Item { Item {
id: root id: root
width: 200
height: 75
function setTab(index) function setTab(index)
{ {

View File

@@ -148,6 +148,8 @@ ItemLibraryWidget::ItemLibraryWidget(AsynchronousImageCache &imageCache,
// create header widget // create header widget
m_headerWidget->setResizeMode(QQuickWidget::SizeRootObjectToView); m_headerWidget->setResizeMode(QQuickWidget::SizeRootObjectToView);
m_headerWidget->setMinimumHeight(75);
m_headerWidget->setMinimumWidth(100);
Theme::setupTheme(m_headerWidget->engine()); Theme::setupTheme(m_headerWidget->engine());
m_headerWidget->engine()->addImportPath(propertyEditorResourcesPath() + "/imports"); m_headerWidget->engine()->addImportPath(propertyEditorResourcesPath() + "/imports");
m_headerWidget->setClearColor(Theme::getColor(Theme::Color::DSpanelBackground)); m_headerWidget->setClearColor(Theme::getColor(Theme::Color::DSpanelBackground));