From ffaca3ab13800bdf7c496b3eef9eb255058d147c Mon Sep 17 00:00:00 2001 From: Marcel Otte Date: Sun, 22 Mar 2015 22:32:18 +0100 Subject: [PATCH] still more playing --- editorelement.cpp | 1 + mainwindow.cpp | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/editorelement.cpp b/editorelement.cpp index 1952beb..6824985 100644 --- a/editorelement.cpp +++ b/editorelement.cpp @@ -15,6 +15,7 @@ EditorElement::EditorElement(QWidget *parent) : QWidget(parent) label->setText("test"); hint->setText("another test"); edit->setText("content test"); + this->setStyleSheet("QWidget {border: 2px dashed red}"); } diff --git a/mainwindow.cpp b/mainwindow.cpp index 80dda28..679efc0 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -13,9 +13,13 @@ MainWindow::MainWindow(QWidget *parent) centralLayout->addWidget(new EditorElement(this)); this->setCentralWidget(editor); QString style = QString( - "QWidget {border: 2px dashed black;" + "QWidget {" "border-radius: 5px;" - "background: gray }" + "background: white }" + "QLabel {border: 2px dashed black; background: gray; " + "border-radius: 5px;}" + "QLineEdit {border: 2px dashed black;background: dark-gray;" + "border-radius: 5px;}" ); editor->setStyleSheet(style);