25 const QSize minSize = m_thisWidget->property(
"kddockwidgets_min_size").toSize();
31 return QRectF(m_thisWidget->x(), m_thisWidget->y(),
32 m_thisWidget->width(), m_thisWidget->height())
45 m_thisWidget->setParent(
nullptr);
49 if (
auto qquickitem = qobject_cast<QQuickItem *>(
parent->asQObject())) {
50 m_thisWidget->setParent(qquickitem);
51 m_thisWidget->setParentItem(qquickitem);
53 qWarning() << Q_FUNC_INFO <<
"parent is not a widget, you have a bug" <<
parent->asQObject();
60 d <<
" Dump Start: Host=" << m_thisWidget <<
rect();
66 return m_thisWidget->isVisible();
71 m_thisWidget->setVisible(is);
76 if (
auto pw = m_thisWidget->parentItem()) {
85 const QSize maxSize = m_thisWidget->property(
"kddockwidgets_max_size").toSize();
92 m_thisWidget->setVisible(
true);
97 m_thisWidget->setVisible(
false);
109 m_thisWidget->setSize(
QSize(width, height));
114 m_thisWidget->setWidth(width);
119 m_thisWidget->setHeight(height);
124 m_thisWidget->update();
130 QQmlEngine *engine =
nullptr;
131 while (p && !engine) {
132 engine = qmlEngine(p);
137 qWarning() << Q_FUNC_INFO <<
"No engine found";
141 QQmlComponent component(engine, filename);
142 auto qquickitem = qobject_cast<QQuickItem *>(component.create());
144 qWarning() << Q_FUNC_INFO << component.errorString();
148 qquickitem->setParentItem(
parent);
149 qquickitem->QObject::setParent(
parent);