Use qGuiApp instead of qApp

As QtQuick applications might not have QApplication.
This commit is contained in:
Sergio Martins
2022-06-06 13:21:35 +01:00
parent 995df8e3e8
commit 5faf36700b
24 changed files with 72 additions and 68 deletions

View File

@@ -57,7 +57,7 @@ public:
p.setPen(pen);
p.setBrush(brush);
p.drawRect(rect().adjusted(4, 4, -4, -4));
QFont f = qApp->font();
QFont f = qGuiApp->font();
f.setPixelSize(30);
f.setBold(true);
p.setFont(f);