26 const QSize minSize = m_thisWidget->property(
"kddockwidgets_min_size").toSize();
32 return QRectF(m_thisWidget->x(), m_thisWidget->y(),
33 m_thisWidget->width(), m_thisWidget->height())
46 m_thisWidget->setParent(
nullptr);
50 if (
auto qquickitem = qobject_cast<QQuickItem *>(
parent->asQObject())) {
51 m_thisWidget->setParent(qquickitem);
52 m_thisWidget->setParentItem(qquickitem);
54 qWarning() << Q_FUNC_INFO <<
"parent is not a widget, you have a bug" <<
parent->asQObject();
61 d <<
" Dump Start: Host=" << m_thisWidget <<
rect();
67 return m_thisWidget->isVisible();
72 m_thisWidget->setVisible(is);
77 if (
auto pw = m_thisWidget->parentItem()) {
86 const QSize maxSize = m_thisWidget->property(
"kddockwidgets_max_size").toSize();
93 m_thisWidget->setVisible(
true);
98 m_thisWidget->setVisible(
false);
110 m_thisWidget->setSize(
QSize(width, height));
115 m_thisWidget->setWidth(width);
120 m_thisWidget->setHeight(height);
125 m_thisWidget->update();
131 QQmlEngine *engine =
nullptr;
132 while (p && !engine) {
133 engine = qmlEngine(p);
138 qWarning() << Q_FUNC_INFO <<
"No engine found";
142 QQmlComponent component(engine, filename);
143 auto qquickitem = qobject_cast<QQuickItem *>(component.create());
145 qWarning() << Q_FUNC_INFO << component.errorString();
149 qquickitem->setParentItem(
parent);
150 qquickitem->QObject::setParent(
parent);
void setTopLeft(const QPoint &position)
QPoint topLeft() const const
QRect toRect() const const
QSize expandedTo(const QSize &otherSize) const const
bool isEmpty() const const