From 21675de534243a65fdd19e28be1145e5f0e2d294 Mon Sep 17 00:00:00 2001 From: John Van Ostrand Date: Thu, 20 Nov 2014 10:34:49 -0500 Subject: Small changes to Yearly Statistics window Added a title bar with close button. Set an appropriate title. Centred the window relative to mainwindow. Signed-off-by: John Van Ostrand Signed-off-by: Dirk Hohndel --- qt-ui/mainwindow.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'qt-ui') diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index 9b82f219a..d908fcd08 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(); } -- cgit v1.2.3-70-g09d2