mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2025-07-02 16:15:28 +08:00
update
This commit is contained in:
@ -8,7 +8,6 @@ WindowLifecycle::WindowLifecycle(QObject *parent):QObject{parent}{
|
||||
|
||||
void WindowLifecycle::onCompleted(QQuickWindow* window){
|
||||
this->_window = window;
|
||||
vsyncEnable(FluApp::getInstance()->vsync());
|
||||
FluApp::getInstance()->addWindow(this->_window);
|
||||
}
|
||||
|
||||
@ -22,12 +21,6 @@ void WindowLifecycle::onDestruction(){
|
||||
void WindowLifecycle::onVisible(bool visible){
|
||||
}
|
||||
|
||||
void WindowLifecycle::vsyncEnable(bool enable){
|
||||
auto froamt = _window->format();
|
||||
froamt.setSwapInterval(enable);
|
||||
_window->setFormat(froamt);
|
||||
}
|
||||
|
||||
QVariant WindowLifecycle::createRegister(QQuickWindow* window,const QString& path){
|
||||
FluRegister *p = new FluRegister(window);
|
||||
p->from(window);
|
||||
|
@ -22,7 +22,6 @@ public:
|
||||
Q_INVOKABLE void onVisible(bool visible);
|
||||
Q_INVOKABLE void onDestoryOnClose();
|
||||
Q_INVOKABLE QVariant createRegister(QQuickWindow* window,const QString& path);
|
||||
void vsyncEnable(bool enable);
|
||||
private:
|
||||
QQuickWindow* _window;
|
||||
};
|
||||
|
Reference in New Issue
Block a user