From 2e9a1b69db397401229e7e2b36f5809509c3b735 Mon Sep 17 00:00:00 2001 From: zcy <290198252@qq.com> Date: Tue, 15 Dec 2020 00:11:15 +0800 Subject: [PATCH] no message --- Qss.cpp | 7 +++---- css/QssTitleBar.css | 12 +++++++----- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Qss.cpp b/Qss.cpp index dd5288e..842bceb 100644 --- a/Qss.cpp +++ b/Qss.cpp @@ -59,7 +59,7 @@ QssTtitleBar::QssTtitleBar(QWidget *parent , m_iconBtn->setObjectName("titlebaricon"); m_titlebarTitle = new QLabel(this); - m_titlebarTitle->setObjectName("titlebartitle"); + m_titlebarTitle->setObjectName("title"); QHBoxLayout* hBox = new QHBoxLayout(this); hBox->setMargin(0); @@ -86,8 +86,7 @@ QssTtitleBar::QssTtitleBar(QWidget *parent , m_rcValid = QApplication::desktop()->availableGeometry(); this->setFixedHeight(37); - setWindowFlags(windowFlags()| - Qt::MSWindowsFixedSizeDialogHint); + setWindowFlags(windowFlags()|Qt::MSWindowsFixedSizeDialogHint); this->setGeometry(parent->geometry().x(),parent->geometry().y(),0,0); m_rcNormal = parentWidget()->geometry(); @@ -371,7 +370,7 @@ void QssMainWindow::showNormal() void QssMainWindow::setWindowTitle( QString title ) { - m_frame->setWindowTitle(title); + //m_frame->setWindowTitle(title); m_titleBar->setTitle(title); } diff --git a/css/QssTitleBar.css b/css/QssTitleBar.css index 65e5ff7..4035a68 100644 --- a/css/QssTitleBar.css +++ b/css/QssTitleBar.css @@ -9,11 +9,7 @@ QWidget#qssTitleBar > QPushButton#titlebaricon{ width: 30px; height:30px; } -QWidget#qssTitleBar > QLable#titlebartitle{ - font-family:"微软雅黑"; - color: white; - font-size: 30px; -} + QWidget#qssTitleBar>QPushButton#titlebarclosebtn{ image: url(":/qss/icon/btn_close_down.svg"); background: rgb(7,71,166); @@ -59,3 +55,9 @@ QWidget#qssTitleBar >QPushButton#btn_serial:!enabled { QWidget#qssTitleBar >QPushButton#titlebarmaxbtn:enabled:hover{ background: rgb(100, 160, 220); } +QWidget#qssTitleBar > QLabel#title{ + color: white; + font-size:30px; + font-family:'Courier New', Courier, monospace; +} +