diff --git a/QtMeshViewer/Resources/Resources.qrc b/QtMeshViewer/Resources/Resources.qrc index ee43df8432855229c636391d595924ce5e40bef7..7d8638521696a0681eba0fa9071a50a9ea7897b3 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 0000000000000000000000000000000000000000..717dd217c40343e23c740e29a7ca7521072a6b57 --- /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 08ef03dfcc1e14ed801fe4d438693decbe8d6661..bc322b8288d7a81d391d90af9a3b72d8b42250c2 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);