|
|
|
@ -21,6 +21,7 @@
|
|
|
|
#include <QEvent>
|
|
|
|
#include <QEvent>
|
|
|
|
#include <QDebug>
|
|
|
|
#include <QDebug>
|
|
|
|
#include <QQuickWindow>
|
|
|
|
#include <QQuickWindow>
|
|
|
|
|
|
|
|
#include <QPixmapCache>
|
|
|
|
|
|
|
|
|
|
|
|
Window::Window(QObject *parent)
|
|
|
|
Window::Window(QObject *parent)
|
|
|
|
: QQmlApplicationEngine(parent)
|
|
|
|
: QQmlApplicationEngine(parent)
|
|
|
|
@ -40,6 +41,7 @@ void Window::load(const QUrl &url)
|
|
|
|
bool Window::eventFilter(QObject *obj, QEvent *e)
|
|
|
|
bool Window::eventFilter(QObject *obj, QEvent *e)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (e->type() == QEvent::Close) {
|
|
|
|
if (e->type() == QEvent::Close) {
|
|
|
|
|
|
|
|
QPixmapCache::clear();
|
|
|
|
clearComponentCache();
|
|
|
|
clearComponentCache();
|
|
|
|
deleteLater();
|
|
|
|
deleteLater();
|
|
|
|
e->accept();
|
|
|
|
e->accept();
|
|
|
|
|