diff --git a/QtMeshViewer/Resources/Resources.qrc b/QtMeshViewer/Resources/Resources.qrc index ee43df8..7d86385 100644 --- a/QtMeshViewer/Resources/Resources.qrc +++ b/QtMeshViewer/Resources/Resources.qrc @@ -8,6 +8,7 @@ about.txt + StyleSheet.txt placeholder.png diff --git a/QtMeshViewer/Resources/StyleSheet.txt b/QtMeshViewer/Resources/StyleSheet.txt new file mode 100644 index 0000000..717dd21 --- /dev/null +++ b/QtMeshViewer/Resources/StyleSheet.txt @@ -0,0 +1,21 @@ +QToolButton#test123 { + color: #000000; +} + +QToolButton:checked { + background-color: #ffffff; + border-style: inset; + border-width: 1px; + border-radius: 5px; + border-color: #b3b3b3; + min-height: 25px +} + +QToolButton:hover { + border-style: solid; + border-width: 1px; + border-radius: 5px; + border-color: #a4daff; + min-height: 25px +} + diff --git a/QtMeshViewer/Source/MainWindow.cpp b/QtMeshViewer/Source/MainWindow.cpp index 08ef03d..bc322b8 100644 --- a/QtMeshViewer/Source/MainWindow.cpp +++ b/QtMeshViewer/Source/MainWindow.cpp @@ -35,6 +35,10 @@ MainWindow::MainWindow(QWidget *parent) ui->statusBar->showMessage("MeshViewer by Anakin", 0); m_fileInfo += "Filename: -\nMaterials: -\nVertices: -\nTriangle: -No file is open"; + + QFile styleSheet(":/files/StyleSheet.txt"); + styleSheet.open(QIODevice::ReadOnly); + this->setStyleSheet(styleSheet.readAll()); } MainWindow::~MainWindow() @@ -118,6 +122,11 @@ void MainWindow::setupWidgets() connect(help, &QAction::triggered, this, &MainWindow::aboutTool); ui->mainToolBar->addAction(help); + QAction *test = new QAction(this); + test->setCheckable(true); + test->setObjectName("test123"); + ui->mainToolBar->addAction(test); + m_output->setObjectName("output"); m_output->setStyleSheet("QLabel#output{color : white; min-width: 400px; min-height: 50px;}"); m_output->setAlignment(Qt::AlignTop);