master
parent
56d6dce19c
commit
7b6a11a962
|
@ -1,4 +1,5 @@
|
|||
#include "frmmain.h"
|
||||
#pragma execution_character_set("utf-8")
|
||||
#include "frmmain.h"
|
||||
#include "ui_frmmain.h"
|
||||
#include "qfile.h"
|
||||
#include "qtranslator.h"
|
||||
|
@ -15,6 +16,12 @@ frmMain::~frmMain()
|
|||
delete ui;
|
||||
}
|
||||
|
||||
void frmMain::showEvent(QShowEvent *)
|
||||
{
|
||||
int width = ui->tabConfig->width() / ui->tabConfig->count() - 20;
|
||||
ui->tabConfig->setStyleSheet(QString("QTabBar::tab{min-width:%1px;}").arg(width));
|
||||
}
|
||||
|
||||
void frmMain::initForm()
|
||||
{
|
||||
this->initTableWidget();
|
||||
|
|
|
@ -16,6 +16,9 @@ public:
|
|||
explicit frmMain(QWidget *parent = 0);
|
||||
~frmMain();
|
||||
|
||||
protected:
|
||||
void showEvent(QShowEvent *);
|
||||
|
||||
private:
|
||||
Ui::frmMain *ui;
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<string>MainWindow</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralwidget">
|
||||
<layout class="QGridLayout" name="gridLayout_7">
|
||||
<layout class="QGridLayout" name="gridLayout_6">
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
|
@ -51,48 +51,34 @@
|
|||
<widget class="QTextEdit" name="txtMain"/>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QFrame" name="frameColor">
|
||||
<widget class="QTabWidget" name="tabConfig">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>220</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>220</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
<property name="tabPosition">
|
||||
<enum>QTabWidget::South</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tabColor">
|
||||
<attribute name="title">
|
||||
<string>颜色</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<property name="leftMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="labTextColor">
|
||||
<property name="text">
|
||||
<string>字体颜色</string>
|
||||
<string>字体文字颜色</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -109,7 +95,7 @@
|
|||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="labPanelColor">
|
||||
<property name="text">
|
||||
<string>面板背景</string>
|
||||
<string>面板背景颜色</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -126,7 +112,7 @@
|
|||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="labBorderColor">
|
||||
<property name="text">
|
||||
<string>边框颜色</string>
|
||||
<string>全局边框颜色</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -227,6 +213,60 @@
|
|||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_11">
|
||||
<attribute name="title">
|
||||
<string>尺寸</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_7">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="labIconWidth">
|
||||
<property name="text">
|
||||
<string>指示器宽度</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="txtIconWidth">
|
||||
<property name="text">
|
||||
<string>40</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="labIconHeight">
|
||||
<property name="text">
|
||||
<string>指示器高度</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="txtIconHeight">
|
||||
<property name="text">
|
||||
<string>40</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>173</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_10">
|
||||
<attribute name="title">
|
||||
<string>其他</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2">
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
|
@ -249,18 +289,49 @@
|
|||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_8">
|
||||
<item row="0" column="3">
|
||||
<widget class="QWidget" name="widgetControl" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lab">
|
||||
<property name="text">
|
||||
<string>飞扬青云</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::Box</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Sunken</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>我是标签</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" colspan="6">
|
||||
<item row="0" column="2" colspan="3">
|
||||
<widget class="QLineEdit" name="lineEdit">
|
||||
<property name="text">
|
||||
<string>拿人钱财替人消灾,人生江湖如此,程序江湖亦如此.</string>
|
||||
|
@ -268,136 +339,29 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QRadioButton" name="rbtn1">
|
||||
<property name="text">
|
||||
<string>单选框1</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QRadioButton" name="rbtn2">
|
||||
<property name="text">
|
||||
<string>单选框2</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QCheckBox" name="ck1">
|
||||
<property name="text">
|
||||
<string>复选框1</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QCheckBox" name="ck2">
|
||||
<property name="text">
|
||||
<string>复选框2</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="4">
|
||||
<widget class="QCheckBox" name="ck3">
|
||||
<property name="text">
|
||||
<string>复选框3</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="5">
|
||||
<widget class="QComboBox" name="cbox1">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="6">
|
||||
<widget class="QComboBox" name="cbox2">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QPushButton" name="btnInfo">
|
||||
<property name="text">
|
||||
<string>信息框</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QPushButton" name="btnQuestion">
|
||||
<property name="text">
|
||||
<string>提示框</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QPushButton" name="btnError">
|
||||
<property name="text">
|
||||
<string>错误框</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3">
|
||||
<widget class="QPushButton" name="btnInput">
|
||||
<property name="text">
|
||||
<string>标准输入框</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="4">
|
||||
<widget class="QPushButton" name="btnInputPwd">
|
||||
<property name="text">
|
||||
<string>密码输入框</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="5">
|
||||
<widget class="QPushButton" name="btnInputcbox">
|
||||
<property name="text">
|
||||
<string>下拉输入框</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="6">
|
||||
<widget class="QPushButton" name="btnWidget">
|
||||
<property name="text">
|
||||
<string>新窗体</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QSpinBox" name="spinBox"/>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<item row="1" column="1">
|
||||
<widget class="QDoubleSpinBox" name="doubleSpinBox"/>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<item row="1" column="2">
|
||||
<widget class="QTimeEdit" name="timeEdit"/>
|
||||
</item>
|
||||
<item row="3" column="3" colspan="2">
|
||||
<item row="1" column="3">
|
||||
<widget class="QDateEdit" name="dateEdit">
|
||||
<property name="calendarPopup">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="5" colspan="2">
|
||||
<item row="1" column="4">
|
||||
<widget class="QDateTimeEdit" name="dateTimeEdit">
|
||||
<property name="calendarPopup">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="3">
|
||||
<item row="3" column="0" colspan="5">
|
||||
<widget class="QSlider" name="horizontalSlider">
|
||||
<property name="maximum">
|
||||
<number>100</number>
|
||||
|
@ -407,34 +371,266 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="3" colspan="4">
|
||||
<widget class="QProgressBar" name="progressBar">
|
||||
<item row="4" column="0" colspan="5">
|
||||
<widget class="QProgressBar" name="progressBar1">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>18</height>
|
||||
<height>22</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="7">
|
||||
<widget class="QPlainTextEdit" name="plainTextEdit">
|
||||
<property name="plainText">
|
||||
<string>每个人心中都有一段鲜不为人知的故事,
|
||||
如果不是某一天,
|
||||
某个不经意的回头一瞥,
|
||||
那段往事,
|
||||
就只能永远埋在记忆的最深处,
|
||||
那是回忆的尽头,
|
||||
可就无法避免那一触,
|
||||
无论你在上面用怎样淤厚的冷漠层层包裹,
|
||||
却总在瞬间崩溃。</string>
|
||||
<item row="5" column="0" colspan="5">
|
||||
<widget class="QScrollBar" name="horizontalScrollBar">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QComboBox" name="cbox1"/>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QComboBox" name="cbox2"/>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QLCDNumber" name="lcdNumber">
|
||||
<property name="digitCount">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="segmentStyle">
|
||||
<enum>QLCDNumber::Flat</enum>
|
||||
</property>
|
||||
<property name="value" stdset="0">
|
||||
<double>12345.000000000000000</double>
|
||||
</property>
|
||||
<property name="intValue" stdset="0">
|
||||
<number>12345</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3" colspan="2">
|
||||
<widget class="QFontComboBox" name="fontComboBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Ignored" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="4">
|
||||
<widget class="QSlider" name="verticalSlider">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_10">
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnInput1">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>标准输入框</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnInput2">
|
||||
<property name="text">
|
||||
<string>密码输入框</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnInput3">
|
||||
<property name="text">
|
||||
<string>下拉输入框</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnWidget">
|
||||
<property name="text">
|
||||
<string>弹出新窗体</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnAbout">
|
||||
<property name="text">
|
||||
<string>关于Qt</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="5">
|
||||
<widget class="QProgressBar" name="progressBar2">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>12</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="textVisible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="6">
|
||||
<widget class="QScrollBar" name="verticalScrollBar">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_9">
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnInfo">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>信息框</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnQuestion">
|
||||
<property name="text">
|
||||
<string>询问框</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnError">
|
||||
<property name="text">
|
||||
<string>错误框</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnTip">
|
||||
<property name="text">
|
||||
<string>右下框</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnDate">
|
||||
<property name="text">
|
||||
<string>日期框</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_8">
|
||||
<item>
|
||||
<widget class="QRadioButton" name="rbtn1">
|
||||
<property name="text">
|
||||
<string>单选框1</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="rbtn2">
|
||||
<property name="text">
|
||||
<string>单选框2</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="rbtn3">
|
||||
<property name="text">
|
||||
<string>单选框3</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="ck1">
|
||||
<property name="text">
|
||||
<string>复选框1</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="ck2">
|
||||
<property name="text">
|
||||
<string>复选框2</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="ck3">
|
||||
<property name="text">
|
||||
<string>复选框3</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<spacer name="verticalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_12">
|
||||
<attribute name="title">
|
||||
<string>多行文本</string>
|
||||
</attribute>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_8">
|
||||
<item>
|
||||
<widget class="QTextEdit" name="textEdit"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPlainTextEdit" name="plainTextEdit">
|
||||
<property name="plainText">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTextBrowser" name="textBrowser"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab2">
|
||||
|
@ -684,20 +880,6 @@
|
|||
<widget class="QWidget" name="page3"/>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSlider" name="verticalSlider">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QScrollBar" name="verticalScrollBar">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab4">
|
||||
|
@ -864,111 +1046,40 @@
|
|||
</widget>
|
||||
<widget class="QWidget" name="tab9">
|
||||
<attribute name="title">
|
||||
<string>UI界面</string>
|
||||
<string>内置图标</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_6">
|
||||
<property name="leftMargin">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QWidget" name="widgetIcon" native="true">
|
||||
<layout class="QGridLayout" name="gridLayout_4">
|
||||
<item row="0" column="0">
|
||||
<widget class="QPushButton" name="btnUIDemo1">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
<property name="leftMargin">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>界面1</string>
|
||||
<property name="topMargin">
|
||||
<number>3</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QPushButton" name="btnUIDemo2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
<property name="rightMargin">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>界面2</string>
|
||||
<property name="bottomMargin">
|
||||
<number>3</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QPushButton" name="btnUIDemo3">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>界面3</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QPushButton" name="btnUIDemo4">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>界面4</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QPushButton" name="btnUIDemo5">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>界面5</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QPushButton" name="btnUIDemo6">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>界面6</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QPushButton" name="btnUIDemo7">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>界面7</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QPushButton" name="btnUIDemo8">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>界面8</string>
|
||||
<property name="spacing">
|
||||
<number>3</number>
|
||||
</property>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
@ -977,7 +1088,7 @@
|
|||
<attribute name="title">
|
||||
<string>视频监控</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_6">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_7">
|
||||
<item>
|
||||
<widget class="QWidget" name="widgetVideo" native="true">
|
||||
<layout class="QGridLayout" name="gridLayout_5">
|
||||
|
@ -1199,22 +1310,5 @@
|
|||
</action>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>horizontalSlider</sender>
|
||||
<signal>valueChanged(int)</signal>
|
||||
<receiver>progressBar</receiver>
|
||||
<slot>setValue(int)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>207</x>
|
||||
<y>445</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>399</x>
|
||||
<y>445</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
|
|
@ -1,14 +1,37 @@
|
|||
#include "frmmain.h"
|
||||
#include "qapplication.h"
|
||||
#include <QApplication>
|
||||
#include <QTextCodec>
|
||||
#include <QDesktopWidget>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication a(argc, argv);
|
||||
a.setFont(QFont("Microsoft Yahei", 9));
|
||||
|
||||
#if (QT_VERSION <= QT_VERSION_CHECK(5,0,0))
|
||||
#if _MSC_VER
|
||||
QTextCodec *codec = QTextCodec::codecForName("gbk");
|
||||
#else
|
||||
QTextCodec *codec = QTextCodec::codecForName("utf-8");
|
||||
#endif
|
||||
QTextCodec::setCodecForLocale(codec);
|
||||
QTextCodec::setCodecForCStrings(codec);
|
||||
QTextCodec::setCodecForTr(codec);
|
||||
#else
|
||||
QTextCodec *codec = QTextCodec::codecForName("utf-8");
|
||||
QTextCodec::setCodecForLocale(codec);
|
||||
#endif
|
||||
|
||||
frmMain w;
|
||||
w.setWindowTitle("styledemo Author: feiyangqingyun@163.com QQ: 517216493");
|
||||
w.show();
|
||||
|
||||
//居中显示窗体
|
||||
QDesktopWidget deskWidget;
|
||||
int deskWidth = deskWidget.availableGeometry().width();
|
||||
int deskHeight = deskWidget.availableGeometry().height();
|
||||
QPoint movePoint(deskWidth / 2 - w.width() / 2, deskHeight / 2 - w.height() / 2);
|
||||
w.move(movePoint);
|
||||
|
||||
return a.exec();
|
||||
}
|
||||
|
|
|
@ -0,0 +1,134 @@
|
|||
PS:本样式demo完全开源。
|
||||
|
||||
V20170219首版开发计划
|
||||
1:所有其他窗体都是其布居中的widget。
|
||||
2:左上角图标、标题、标题居中、右上角最小化最大化关闭都可设置,包括设置样式+图标+图形字体(默认图形字体)。
|
||||
3:左上角图标及右上角三个按钮可视化控制。同时提供外部访问权限。
|
||||
4:无边框窗体可拉伸控制。
|
||||
5:提供换肤接口,内置8套样式选择,也可自定义样式路径。
|
||||
6:做成设计师插件,可以直接拖曳使用,所见即所得。
|
||||
7:后期增加内置信息框、颜色框等弹出窗体的支持。
|
||||
|
||||
8:重新设计QSS样式,去掉单选框图片、滚动条图片,增加主菜单样式。
|
||||
样式表格式
|
||||
(1):第一行为特殊自定义部分,可以通过读取文本文件识别到特殊的颜色值。用于特殊处理。
|
||||
(2):第二行为全局样式设置,例如无虚线,全局字体大小,文字颜色,禁用控件颜色。
|
||||
(3):其他部分
|
||||
(3):标签控件
|
||||
(4):按钮控件
|
||||
|
||||
用Qt写项目写多了,为了满足不同客户的需求,需要定制不同样式的界面,QUI皮肤生成器应运而生。思考这个工具的架构花了一年时间,如何从复杂的配色方案中提取出共性,然后将共性转为具体的QSS文件。思考架构花了一年时间,编写大概花了一天时间完成。
|
||||
demo演示版:http://pan.baidu.com/s/1jIkbVKU
|
||||
|
||||
QUI皮肤生成器介绍:
|
||||
1:极简设计,傻瓜式操作步骤:,只需简单几步即可设计出漂亮的皮肤。
|
||||
2:所见即所得,想要什么好的皮肤,分分钟搞定。
|
||||
3:自动生成样式中所需要的对应颜色的图片资源文件,比如单选框、复选框指示器图片。
|
||||
4:集成自定义无边框标题栏样式、左边导航切换样式、顶部导航切换样式、设备面板样式。
|
||||
|
||||
|
||||
|
||||
|
||||
银色风格
|
||||
字体颜色:#000000
|
||||
面板背景:#F5F5F5
|
||||
边框颜色:#B2B6B9
|
||||
普通渐变:#E1E4E6 #CCD3D9
|
||||
加深渐变:#F2F3F4 #E7E9EB
|
||||
高亮颜色:#00BB9E
|
||||
|
||||
蓝色风格
|
||||
字体颜色:#324C6C
|
||||
面板背景:#CFDDEE
|
||||
边框颜色:#7F9AB8
|
||||
普通渐变:#C0D3EB #BCCFE7
|
||||
加深渐变:#D2E3F5 #CADDF3
|
||||
高亮颜色:#00BB9E
|
||||
|
||||
淡蓝色风格
|
||||
字体颜色:#386487
|
||||
面板背景:#EAF7FF
|
||||
边框颜色:#C0DCF2
|
||||
普通渐变:#DEF0FE #C0DEF6
|
||||
加深渐变:#F2F9FF #DAEFFF
|
||||
高亮颜色:#00BB9E
|
||||
|
||||
深蓝色风格
|
||||
字体颜色:#7AAFE3
|
||||
面板背景:#0E1A32
|
||||
边框颜色:#132743
|
||||
普通渐变:#133050 #133050
|
||||
加深渐变:#033967 #033967
|
||||
高亮颜色:#00BB9E
|
||||
|
||||
灰色风格
|
||||
字体颜色:#000000
|
||||
面板背景:#F0F0F0
|
||||
边框颜色:#A9A9A9
|
||||
普通渐变:#E4E4E4 #A2A2A2
|
||||
加深渐变:#DBDBDB #C1C1C1
|
||||
高亮颜色:#00BB9E
|
||||
|
||||
浅灰色风格:
|
||||
字体颜色:#6F6F6F
|
||||
面板背景:#F0F0F0
|
||||
边框颜色:#D4D0C8
|
||||
普通渐变:#EEEEEE #E5E5E5
|
||||
加深渐变:#FCFCFC #F7F7F7
|
||||
高亮颜色:#00BB9E
|
||||
|
||||
深灰色风格
|
||||
字体颜色:#5D5C6C
|
||||
面板背景:#EBECF0
|
||||
边框颜色:#A9ACB5
|
||||
普通渐变:#D8D9DE #C8C8D0
|
||||
加深渐变:#EFF0F4 #DDE0E7
|
||||
高亮颜色:#00BB9E
|
||||
|
||||
黑色风格
|
||||
字体颜色:#F0F0F0
|
||||
面板背景:#464646
|
||||
边框颜色:#353535
|
||||
普通渐变:#4D4D4D #292929
|
||||
加深渐变:#636363 #575757
|
||||
高亮颜色:#00BB9E
|
||||
|
||||
浅黑色风格
|
||||
字体颜色:#E7ECF0
|
||||
面板背景:#616F76
|
||||
边框颜色:#738393
|
||||
普通渐变:#667481 #566373
|
||||
加深渐变:#778899 #708090
|
||||
高亮颜色:#00BB9E
|
||||
|
||||
深黑色风格
|
||||
字体颜色:#D7E2E9
|
||||
面板背景:#1F2026
|
||||
边框颜色:#111214
|
||||
普通渐变:#242629 #141518
|
||||
加深渐变:#007DC4 #0074BF
|
||||
高亮颜色:#00BB9E
|
||||
|
||||
PS黑色风格
|
||||
字体颜色:#DCDCDC
|
||||
面板背景:#444444
|
||||
边框颜色:#242424
|
||||
普通渐变:#484848 #383838
|
||||
加深渐变:#646464 #525252
|
||||
高亮颜色:#00BB9E
|
||||
|
||||
黑色扁平
|
||||
字体颜色:#BEC0C2
|
||||
面板背景:#2E2F30
|
||||
边框颜色:#67696B
|
||||
普通渐变:#404244 #404244
|
||||
加深渐变:#262829 #262829
|
||||
高亮颜色:#00BB9E
|
||||
|
||||
白色扁平
|
||||
字体颜色:#57595B
|
||||
面板背景:#FFFFFF
|
||||
边框颜色:#B6B6B6
|
||||
普通渐变:#E4E4E4 #E4E4E4
|
||||
加深渐变:#F6F6F6 #F6F6F6
|
||||
高亮颜色:#00BB9E
|
Loading…
Reference in New Issue