script
su -
yum install qt5-qtscript-devel
do .pro pridat
QT += core gui script scripttools
do okna pridat
QPlainText input
QTextEdit output
a tlacitko Run
#include <QScriptEngine> #include <QScriptEngineDebugger> void MainWindow::on_actionRun_triggered() { QScriptEngine e; QScriptEngineDebugger debugger; debugger.attachTo (&e); QMainWindow *debugWindow = debugger.standardWindow (); debugWindow->resize (1024, 640); QScriptValue infoObject = e.newQObject (ui->output); e.globalObject().setProperty ("info", infoObject); e.evaluate (ui->input->toPlainText()); }
script.txt · Last modified: 2015/03/25 14:02 by 127.0.0.1