Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
zhulik committed Jul 2, 2023
1 parent 842af96 commit 594fc0d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
12 changes: 11 additions & 1 deletion resources/qml/Header.qml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,21 @@ ToolBar {
Layout.fillWidth: parent
}

FPSCounter {
FPSCounter {}

ToolSeparator {}

MDI.Button {
iconName: "bug"
Layout.alignment: Qt.AlignRight
onClicked: {
console.log(qmlEngine)
}
}

ToolSeparator {}


MDI.Button {
iconName: "windowClose"
Layout.alignment: Qt.AlignRight
Expand Down
6 changes: 4 additions & 2 deletions src/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,16 @@ Application::Application(int &argc, char **argv) : QGuiApplication{argc, argv} {

QFontDatabase::addApplicationFont("resources/fonts/materialdesignicons-webfont.ttf");
QQuickStyle::setStyle("Material");
m_engine = new QQmlApplicationEngine();

qmlRegisterType<FolderListModel>("DeckFM", 1, 0, "FolderListModel");

qmlRegisterType<QSteamworks::SteamUtils>("Steamworks", 1, 0, "SteamUtils");
qmlRegisterType<QSteamworks::SteamInput>("Steamworks", 1, 0, "SteamInput");

qmlRegisterSingletonInstance("DeckFM", 1, 0, "FSHelpers", new FSHelpers());

m_engine = new QQmlApplicationEngine();
m_engine->rootContext()->setContextProperty("qApp", this);
m_engine->rootContext()->setContextProperty("qmlEngine", m_engine);

try {
m_steamworks = new QSteamworks::SteamAPI(m_engine);
Expand Down

0 comments on commit 594fc0d

Please sign in to comment.