History

Added a stub for a Qt application class that creates a menu (which, since it's unparented, will only appear on OS X) with a test item connected to a slot.

Andrzej Kapolka committed 13 years ago

Commit 5a113fd1 parent 501aac34 files · +57 −8Browse files

Showing the changes to interface/src/Application.cpp (1 of 4 files). Show all

Unified · Split

interface/src/Application.cpp+22−0
@@ -0,0 +1,22 @@
1+//
2+// Application.cpp
3+// interface
4+//
5+// Created by Andrzej Kapolka on 5/10/13.
6+// Copyright (c) 2013 High Fidelity, Inc. All rights reserved.
7+
8+#include <QMenuBar>
9+#include <QtDebug>
10+
11+#include "Application.h"
12+
13+Application::Application(int& argc, char** argv) : QApplication(argc, argv) {
14+ // simple menu bar (will only appear on OS X, for now)
15+ QMenuBar* menuBar = new QMenuBar();
16+ QMenu* fileMenu = menuBar->addMenu("File");
17+ fileMenu->addAction("Quit", this, SLOT(testSlot()));
18+}
19+
20+void Application::testSlot() {
21+ qDebug() << "Hello world.";
22+}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t