From f04354b5975c943fc0bacbaefb7b4644c37e1948 Mon Sep 17 00:00:00 2001 From: Christoph Egger Date: Thu, 27 Nov 2014 13:18:03 +0100 Subject: [PATCH] Fix widget setup for scripting --- src/gui/widgets/ScriptingDock.hxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/gui/widgets/ScriptingDock.hxx b/src/gui/widgets/ScriptingDock.hxx index e070955..ce53191 100644 --- a/src/gui/widgets/ScriptingDock.hxx +++ b/src/gui/widgets/ScriptingDock.hxx @@ -9,14 +9,16 @@ class ScriptingDock : public QDockWidget { public: ScriptingDock(const QString& title, QWidget * parent = 0) - : logger(log4cxx::Logger::getLogger("ScriptingDock")) { - QDockWidget(title, parent); + : QDockWidget(title, parent) + , logger(log4cxx::Logger::getLogger("ScriptingDock")) { + QTabWidget * tab = new QTabWidget; QWidget * widget = new QWidget; - widget->setLayout(layout = new QGridLayout(this)); + widget->setLayout(layout = new QGridLayout); layout->addWidget(browser = new QTextBrowser, 0, 0, 1, 0); layout->addWidget(line = new QLineEdit, 1, 0); layout->addWidget(button = new QPushButton(tr("Evaluate")), 1, 1); - setWidget(widget); + tab->addTab(widget, "GUILE"); + ((QDockWidget*)this)->setWidget(tab); connect(button, SIGNAL(released()), this, SLOT(doEvaluate())); connect(line, SIGNAL(returnPressed()), this, SLOT(doEvaluate())); scm_init_guile(); -- 2.39.5