-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgui.cpp
More file actions
37 lines (27 loc) · 768 Bytes
/
Copy pathgui.cpp
File metadata and controls
37 lines (27 loc) · 768 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Copyright (c) 2011 Scott Mansell <phiren@gmail.com>
// Licensed under the MIT license
// Refer to the included LICENCE file.
#include <QtGui>
#include <cstdio>
#include <cstdarg>
QTextEdit *textEdit;
extern "C" void debugf(char *format, ...) {
va_list args;
va_start(args, format);
vprintf(format, args);
va_end(args);
}
int main(int argv, char **args) {
QApplication app(argv, args);
textEdit = new QTextEdit;
textEdit->setReadOnly(TRUE);
QPushButton *quitButton = new QPushButton("Quit");
QObject::connect(quitButton, SIGNAL(clicked()), qApp, SLOT(quit()));
QVBoxLayout *layout = new QVBoxLayout();
layout->addWidget(textEdit);
layout->addWidget(quitButton);
QWidget window;
window.setLayout(layout);
window.show();
return app.exec();
}