X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=src%2Fwindow.cpp;h=1e389f616aaea9c58652e33a64c371047cf967d4;hb=1eaae882a001a2d28213155df68a8a5874fc1f9f;hp=6b125636027a33836aa0ef234972abf964113cc3;hpb=a396e030e8c05f35422ae5d9046149a26553f77c;p=fstl
diff --git a/src/window.cpp b/src/window.cpp
index 6b12563..1e389f6 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -11,6 +11,10 @@ Window::Window(QWidget *parent) :
{
setWindowTitle("fstl");
+ QFile styleFile(":/qt/style.qss");
+ styleFile.open( QFile::ReadOnly );
+ setStyleSheet(styleFile.readAll());
+
QGLFormat format;
format.setVersion(2, 1);
format.setSampleBuffers(true);
@@ -20,17 +24,17 @@ Window::Window(QWidget *parent) :
open_action = new QAction("Open", this);
open_action->setShortcut(QKeySequence::Open);
- QObject::connect(open_action, SIGNAL(triggered()),
- this, SLOT(on_open()));
+ QObject::connect(open_action, &QAction::triggered,
+ this, &Window::on_open);
quit_action = new QAction("Quit", this);
quit_action->setShortcut(QKeySequence::Quit);
- QObject::connect(quit_action, SIGNAL(triggered()),
- this, SLOT(close()));
+ QObject::connect(quit_action, &QAction::triggered,
+ this, &Window::close);
about_action = new QAction("About", this);
- QObject::connect(about_action, SIGNAL(triggered()),
- this, SLOT(on_about()));
+ QObject::connect(about_action, &QAction::triggered,
+ this, &Window::on_about);
auto file_menu = menuBar()->addMenu("File");
file_menu->addAction(open_action);
@@ -54,36 +58,36 @@ void Window::on_open()
void Window::on_about()
{
- QMessageBox::about(this, "About fstl", "fstl
"
- "A fast viewer for .stl
files.
"
- "https://github.com/mkeeter/fstl
"
- "© 2014 Matthew Keeter
"
- "matt.j.keeter@gmail.com
");
+ QMessageBox::about(this, "",
+ "
fstl
" + "A fast viewer for .stl
files.
"
+ "https://github.com/mkeeter/fstl
© 2014 Matthew Keeter
"
+ "matt.j.keeter@gmail.com