2
0
mirror of synced 2025-01-29 15:57:00 +00:00
status-qml/sandbox/main.cpp
Lukáš Tinkl cdf3059d3d
fix(sandbox): enable the hover effects by default (#751)
Similar to what we did in status desktop under
d0a26a326e95a14a6a8a5634c0d30cd6dc648b54

- since Qt 5.xy, hover is not enabled by default for QQC2, so enable it
unconditionally as we are a desktop app anyway
- this fixes several hover effects being broken, mostly for builtin
components like MenuItem and some buttons (eg. the leftmost NavBar)
where we haven't enabled those with `hoverEnabled: true` explicitely
2022-07-04 17:09:00 +02:00

25 lines
533 B
C++

#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include <QDebug>
#include "sandboxapp.h"
int main(int argc, char *argv[])
{
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
#endif
SandboxApp app(argc, argv);
qputenv("QT_QUICK_CONTROLS_HOVER_ENABLED", QByteArrayLiteral("1"));
app.setOrganizationName("Status");
app.setOrganizationDomain("status.im");
app.setApplicationName("Sandbox");
app.startEngine();
return app.exec();
}