aboutsummaryrefslogtreecommitdiffstats
path: root/3rdparty/python-console/test_console.cpp
blob: d025f26bef967eac6750017f0a2ca24679df4c59 (plain)
1
generated by cgit v1.2.3 (git 2.25.1) at 2025-05-24 10:15:34 +0000
 


 href='#n12'>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;
}