Desktop: simple window with tuner intergration

This commit is contained in:
Louis-Joseph Fournier 2015-12-27 09:51:42 +01:00
parent d41035ecc2
commit 8815fd2b65
2 changed files with 16 additions and 2 deletions

View file

@ -1,4 +1,16 @@
import QtQuick 2.0
import LJTuner 1.0
Item {
anchors.fill: parent
Tuner {
id: tuner
running: true
}
Text {
text: tuner.freq.toFixed(2) + " Hz"
font.pixelSize: parent.height / 4
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
}
}

View file

@ -2,9 +2,11 @@
#include <QQuickView>
#include <QtQml>
int main(int argc, char* argv[])
#include "Tuner.hpp"
Q_DECL_EXPORT int main(int argc, char* argv[])
{
// qmlRegisterType<DBMeter>("LJDBMeter", 1, 0, "DBMeter");
qmlRegisterType<Tuner>("LJTuner", 1, 0, "Tuner");
QGuiApplication app(argc, argv);
QQuickView view;