mirror of
https://gitee.com/drabel/LibQQt.git
synced 2025-01-04 10:18:44 +08:00
update qqtapplication.h
This commit is contained in:
parent
60860938eb
commit
35c57f0017
@ -17,6 +17,9 @@
|
|||||||
#Ubuntu: /home/xxx/.qmake/app_configure.pri
|
#Ubuntu: /home/xxx/.qmake/app_configure.pri
|
||||||
#公共路径:应用编译路径、LibrarySDK路径、产品输出路径
|
#公共路径:应用编译路径、LibrarySDK路径、产品输出路径
|
||||||
|
|
||||||
|
#2018年5月3日 08点55分
|
||||||
|
#Multi-link技术只能应用于Qt5,Qt4没有windeployqt程序。
|
||||||
|
|
||||||
#--------------------------------------------------------------------------------
|
#--------------------------------------------------------------------------------
|
||||||
#这个pri依赖qqt_function.pri
|
#这个pri依赖qqt_function.pri
|
||||||
#qqt_function.pri,哪里需要就在哪里包含。
|
#qqt_function.pri,哪里需要就在哪里包含。
|
||||||
|
@ -126,6 +126,11 @@ void QQtApplication::setQSSStyle ( QString qssfile )
|
|||||||
//setPalette(QPalette(QColor("#F0F0F0")));
|
//setPalette(QPalette(QColor("#F0F0F0")));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QQtApplication::setFrameworkStyle ( QString style )
|
||||||
|
{
|
||||||
|
setStyle ( style );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void QQtApplication::setUPanAutorun ( bool run )
|
void QQtApplication::setUPanAutorun ( bool run )
|
||||||
{
|
{
|
||||||
|
@ -21,18 +21,30 @@ public:
|
|||||||
//palette
|
//palette
|
||||||
void setTextFont ( QString fontfile = "/usr/lib/fonts/heiti.ttf",
|
void setTextFont ( QString fontfile = "/usr/lib/fonts/heiti.ttf",
|
||||||
int fontsize = 11 );
|
int fontsize = 11 );
|
||||||
|
//这是设置全部控件的,基本的QSS,通用的QSS,全在这个里,特殊不变的也在这里。
|
||||||
void setQSSStyle ( QString qssfile = "./skin/default.qss" );
|
void setQSSStyle ( QString qssfile = "./skin/default.qss" );
|
||||||
void setUPanAutorun ( bool run = false );
|
void setUPanAutorun ( bool run = false );
|
||||||
void setWriteLogSystem ( bool open = true );
|
void setWriteLogSystem ( bool open = true );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 这个是设置应用程序框架窗口风格的,
|
||||||
|
* "windows", "motif", "cde", "plastique", "windowsxp", or "macintosh"
|
||||||
|
*/
|
||||||
|
void setFrameworkStyle ( QString style = "macintosh" );
|
||||||
|
|
||||||
//这两个函数和MFC架构里的那两个函数一样的功能,但是Qt提供了main函数里的更好的窗口方法,所以,这里无效。
|
//这两个函数和MFC架构里的那两个函数一样的功能,但是Qt提供了main函数里的更好的窗口方法,所以,这里无效。
|
||||||
virtual int initInstance() { return 0; }
|
virtual int initInstance() { return 0; }
|
||||||
virtual int unInitInstance() { return 0; }
|
virtual int unInitInstance() { return 0; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户从这里接收语言更改信号,更改所有窗口的语言。
|
||||||
|
*/
|
||||||
signals:
|
signals:
|
||||||
void languageChanged();
|
void languageChanged();
|
||||||
|
|
||||||
|
//这个是给PluginWatcher用的,和用户无关。允许重写
|
||||||
public slots:
|
public slots:
|
||||||
void slotUPanAutoRun ( int status );
|
virtual void slotUPanAutoRun ( int status );
|
||||||
private:
|
private:
|
||||||
bool bUPanAutoRun;
|
bool bUPanAutoRun;
|
||||||
|
|
||||||
|
@ -3,15 +3,21 @@
|
|||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
|
||||||
|
class QQtSystemInfoPrivate;
|
||||||
|
|
||||||
class QQtSystemInfo : public QObject
|
class QQtSystemInfo : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit QQtSystemInfo(QObject *parent = nullptr);
|
explicit QQtSystemInfo ( QObject* parent = nullptr );
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
|
||||||
|
private:
|
||||||
|
Q_DECLARE_PRIVATE ( QQtSystemInfo )
|
||||||
|
Q_DISABLE_COPY ( QQtSystemInfo )
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // QQTSYSTEMINFO_H
|
#endif // QQTSYSTEMINFO_H
|
@ -33,6 +33,85 @@
|
|||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
<widget class="QPushButton" name="pushButton">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>90</x>
|
||||||
|
<y>260</y>
|
||||||
|
<width>101</width>
|
||||||
|
<height>61</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>PushButton</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QPushButton" name="pushButton_2">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>210</x>
|
||||||
|
<y>260</y>
|
||||||
|
<width>101</width>
|
||||||
|
<height>61</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>PushButton</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QPushButton" name="pushButton_3">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>330</x>
|
||||||
|
<y>260</y>
|
||||||
|
<width>101</width>
|
||||||
|
<height>61</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>PushButton</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLineEdit" name="lineEdit_2">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>400</x>
|
||||||
|
<y>60</y>
|
||||||
|
<width>113</width>
|
||||||
|
<height>20</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLineEdit" name="lineEdit_3">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>400</x>
|
||||||
|
<y>100</y>
|
||||||
|
<width>113</width>
|
||||||
|
<height>20</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLineEdit" name="lineEdit_4">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>400</x>
|
||||||
|
<y>140</y>
|
||||||
|
<width>113</width>
|
||||||
|
<height>20</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QComboBox" name="comboBox">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>230</x>
|
||||||
|
<y>60</y>
|
||||||
|
<width>131</width>
|
||||||
|
<height>22</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<layoutdefault spacing="6" margin="11"/>
|
<layoutdefault spacing="6" margin="11"/>
|
||||||
<resources/>
|
<resources/>
|
||||||
|
6
wiki/knack.md
Normal file
6
wiki/knack.md
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
# QQtApp 开发诀窍
|
||||||
|
|
||||||
|
- 找到常用中转Class,就基本掌握了所有类的使用。
|
||||||
|
- 比如
|
||||||
|
- QByteArray 这个类,用于QString qint QChar char* QBuffer QIODevice等类型和字节序列设备之间的字符转换。它是个重要的中转类别。
|
||||||
|
- QImage 这个类,用于QPixmap 本地文件 QIcon的转换,通过它把文件传到屏幕上。它是个重要的图像中转类型。
|
@ -28,6 +28,11 @@
|
|||||||
|
|
||||||
[LibQQt的地位](LibQQt's-position.md)
|
[LibQQt的地位](LibQQt's-position.md)
|
||||||
|
|
||||||
|
## LibQQt程序开发诀窍
|
||||||
|
|
||||||
|
[QQt应用程序的开发诀窍](knack.md)
|
||||||
|
|
||||||
|
|
||||||
## 返回
|
## 返回
|
||||||
|
|
||||||
[返回](../)
|
[返回](../)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user