-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathtest_console.cpp
More file actions
36 lines (30 loc) · 799 Bytes
/
test_console.cpp
File metadata and controls
36 lines (30 loc) · 799 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
#include <iostream>
#include <QApplication>
#include <QMainWindow>
#include <QWidget>
#include <QGridLayout>
#include <QTextEdit>
#include "Console.h"
#include "Interpreter.h"
Console* console;
void SetupWindow( int argc, char *argv[] )
{
QMainWindow* window = new QMainWindow;
window->resize( 800, 600 );
QWidget* centralWidget = new QWidget(window);
QGridLayout* layout = new QGridLayout(centralWidget);
console = new Console;
layout->addWidget(console, 0, 0, 1, 1);
window->setCentralWidget(centralWidget);
window->show( );
}
int main( int argc, char *argv[] )
{
QApplication app( argc, argv );
Interpreter::Initialize( );
SetupWindow( argc, argv );
bool res = app.exec( );
delete console;
Interpreter::Finalize( );
return res;
}