Added a title bar with close button.
Set an appropriate title.
Centred the window relative to mainwindow.

Signed-off-by: John Van Ostrand <[email protected]>
---
 qt-ui/mainwindow.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index 9b82f21..d908fcd 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -558,10 +558,14 @@ void MainWindow::on_actionYearlyStatistics_triggered()
        view->setModel(m);
        l->addWidget(view);
        d.resize(width() * .8, height() / 2);
+       d.move(width() * .1, height() / 4);
        QShortcut *close = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_W), 
&d);
        connect(close, SIGNAL(activated()), &d, SLOT(close()));
        QShortcut *quit = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q), &d);
        connect(quit, SIGNAL(activated()), this, SLOT(close()));
+       d.setWindowFlags(Qt::Window | Qt::CustomizeWindowHint
+               | Qt::WindowCloseButtonHint | Qt::WindowTitleHint);
+       d.setWindowTitle(tr("Yearly Statistics"));
        d.exec();
 }
 
-- 
1.8.3.1

_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to