diff options
| author | Joel Klinghed <the_jk@yahoo.com> | 2017-07-28 23:30:21 +0200 |
|---|---|---|
| committer | Joel Klinghed <the_jk@yahoo.com> | 2017-07-28 23:30:21 +0200 |
| commit | eecae6af6e99ac341ca9c3aa4b179a2280c07e5b (patch) | |
| tree | f21f9176a3b0452b8567f12c8e9312da66f65c83 /src/gui_qt.cc | |
| parent | f38d9ebb38620d1085951c2827d0d4b4c9d34bc6 (diff) | |
Add GuiWindow::title() and make sure app window has title from start
Diffstat (limited to 'src/gui_qt.cc')
| -rw-r--r-- | src/gui_qt.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gui_qt.cc b/src/gui_qt.cc index c032c87..17eda8f 100644 --- a/src/gui_qt.cc +++ b/src/gui_qt.cc @@ -471,6 +471,9 @@ public: title_ = title; QtGuiWindow::set_title(title); } + std::string const& title() const override { + return title_; + } void* impl() const override { return QtGuiWindow::impl(); @@ -791,6 +794,9 @@ public: void set_title(std::string const& title) override { title_ = title; } + std::string const& title() const override { + return title_; + } void* impl() const override { return QtGuiWindow::impl(); @@ -860,6 +866,9 @@ public: title_ = title; QtGuiWindow::set_title(title); } + std::string const& title() const override { + return title_; + } QWidget* widget() const override { return dialog_; @@ -1408,6 +1417,9 @@ public: title_ = title; QtGuiWindow::set_title(title); } + std::string const& title() const override { + return title_; + } QWidget* widget() const override { return widget_.get(); @@ -1504,6 +1516,7 @@ bool QtGuiMain::run(int argc, char** argv) { QApplication app(argc, argv); app.setStyleSheet("QStatusBar::item { border: 0px }"); main_.reset(new QMainWindow()); + main_->setWindowTitle(QString::fromStdString(title_)); center_.reset(new QWidget()); layout_.reset(new SizeHintLayout(center_.get(), QSize(width_, height_))); splitter_ = new QSplitter(Qt::Vertical, main_.get()); |
