Add text edit to hold the output of the python script
This commit is contained in:
parent
b6fb6ca7d4
commit
cd67e8ddd7
|
@ -13,6 +13,7 @@ MainWindow::MainWindow(QWidget *parent):
|
||||||
QMainWindow(parent),
|
QMainWindow(parent),
|
||||||
ui(new Ui::MainWindow),
|
ui(new Ui::MainWindow),
|
||||||
codeEditor(this),
|
codeEditor(this),
|
||||||
|
pythonOutput(this),
|
||||||
currentFilePath(""),
|
currentFilePath(""),
|
||||||
isFileModified(false)
|
isFileModified(false)
|
||||||
{
|
{
|
||||||
|
@ -27,7 +28,10 @@ MainWindow::MainWindow(QWidget *parent):
|
||||||
font.setStyleHint(QFont::TypeWriter);
|
font.setStyleHint(QFont::TypeWriter);
|
||||||
codeEditor.setFont(font);
|
codeEditor.setFont(font);
|
||||||
|
|
||||||
ui->codeLayout->addWidget(&codeEditor);
|
ui->codeLayout->addWidget(&codeEditor, 1);
|
||||||
|
|
||||||
|
pythonOutput.setReadOnly(true);
|
||||||
|
ui->codeLayout->addWidget(&pythonOutput);
|
||||||
|
|
||||||
// Set up keyboard shortcuts
|
// Set up keyboard shortcuts
|
||||||
ui->actionOpen->setShortcut(QKeySequence::Open);
|
ui->actionOpen->setShortcut(QKeySequence::Open);
|
||||||
|
|
|
@ -26,6 +26,7 @@ class MainWindow : public QMainWindow
|
||||||
QCodeEditor codeEditor;
|
QCodeEditor codeEditor;
|
||||||
QPythonHighlighter highligter;
|
QPythonHighlighter highligter;
|
||||||
QPythonCompleter completer;
|
QPythonCompleter completer;
|
||||||
|
QTextEdit pythonOutput;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void channelStateChanged(uint16_t device, uint16_t channel);
|
void channelStateChanged(uint16_t device, uint16_t channel);
|
||||||
|
|
|
@ -59,8 +59,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>595</width>
|
<width>591</width>
|
||||||
<height>537</height>
|
<height>533</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
|
|
Loading…
Reference in a new issue