| | |
| | | return false; |
| | | } |
| | | |
| | | std::ignore = w->winId(); // Make sure the window handle is created |
| | | if (!d->setup(w->windowHandle(), new WidgetItemDelegate())) { |
| | | w->setAttribute(Qt::WA_DontCreateNativeAncestors); |
| | | w->setAttribute(Qt::WA_NativeWindow); |
| | | |
| | | if (!d->setup(w, new WidgetItemDelegate())) { |
| | | return false; |
| | | } |
| | | d->hostWidget = w; |
| | |
| | | Q_EMIT titleBarWidgetChanged(w); |
| | | } |
| | | |
| | | QWidget *WidgetWindowAgent::systemButton(CoreWindowAgent::SystemButton button) const { |
| | | QWidget *WidgetWindowAgent::systemButton(SystemButton button) const { |
| | | Q_D(const WidgetWindowAgent); |
| | | return static_cast<QWidget *>(d->context->systemButton(button)); |
| | | } |
| | | |
| | | void WidgetWindowAgent::setSystemButton(CoreWindowAgent::SystemButton button, QWidget *w) { |
| | | void WidgetWindowAgent::setSystemButton(SystemButton button, QWidget *w) { |
| | | Q_D(WidgetWindowAgent); |
| | | if (!d->context->setSystemButton(button, w)) { |
| | | return; |