Add text edit to hold the output of the python script

This commit is contained in:
Carl Philipp Klemm 2025-10-13 15:47:44 +02:00
parent b6fb6ca7d4
commit cd67e8ddd7
3 changed files with 8 additions and 3 deletions

View file

@ -13,6 +13,7 @@ MainWindow::MainWindow(QWidget *parent):
QMainWindow(parent),
ui(new Ui::MainWindow),
codeEditor(this),
pythonOutput(this),
currentFilePath(""),
isFileModified(false)
{
@ -27,7 +28,10 @@ MainWindow::MainWindow(QWidget *parent):
font.setStyleHint(QFont::TypeWriter);
codeEditor.setFont(font);
ui->codeLayout->addWidget(&codeEditor);
ui->codeLayout->addWidget(&codeEditor, 1);
pythonOutput.setReadOnly(true);
ui->codeLayout->addWidget(&pythonOutput);
// Set up keyboard shortcuts
ui->actionOpen->setShortcut(QKeySequence::Open);

View file

@ -26,6 +26,7 @@ class MainWindow : public QMainWindow
QCodeEditor codeEditor;
QPythonHighlighter highligter;
QPythonCompleter completer;
QTextEdit pythonOutput;
signals:
void channelStateChanged(uint16_t device, uint16_t channel);

View file

@ -59,8 +59,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>595</width>
<height>537</height>
<width>591</width>
<height>533</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">