mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-23 19:20:59 +08:00
28 lines
492 B
C++
28 lines
492 B
C++
|
#include "WindowHelper.h"
|
|||
|
|
|||
|
WindowHelper::WindowHelper(QObject *parent)
|
|||
|
: QObject{parent}
|
|||
|
{
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
void WindowHelper::classBegin()
|
|||
|
{
|
|||
|
}
|
|||
|
|
|||
|
void WindowHelper::componentComplete()
|
|||
|
{
|
|||
|
|
|||
|
auto rootItem = qobject_cast<QQuickItem*>(parent());
|
|||
|
if (auto window = rootItem->window())
|
|||
|
{
|
|||
|
this->window = window;
|
|||
|
this->window->setTitle("FluentUI");
|
|||
|
qDebug()<<"--------->--------->";
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
void WindowHelper::setTitle(const QString& text){
|
|||
|
window->setTitle(text);
|
|||
|
}
|