91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

。 特點: 1:無邊框窗體,自定義標題欄,鼠標拖動,大小縮放,雙擊切換。 2:除了少量的幾個圖片資源外,幾乎使用QSS寫完所有顏色樣式控制。 3:自定義一個QMessageBox對話框,自動換行顯示提示信息,可以很方便的調用。 4:使用fontawesome圖形字體庫,將互聯網的優秀資源應用于QT中。 5:徹底公開源碼,可以任意隨意使用。 6:QT各個版本都可以編譯通過,親測無誤。 7:自帶提供了四種樣式黑色、藍色、灰色、天藍色風格供選擇,可以自由更改image文件夾下的樣式,也可以自己增加一些樣式。

資源截圖

代碼片段和文件信息

#include?“frmmain.h“
#include?“ui_frmmain.h“
#include?“iconhelper.h“
#include?“myhelper.h“

frmMain::frmMain(QWidget?*parent)?:
????QDialog(parent)
????ui(new?Ui::frmMain)
{
????ui->setupUi(this);

????myHelper::FormInCenter(this);
????this->Initstyle();
}

frmMain::~frmMain()
{
????delete?ui;
}

void?frmMain::Initstyle()
{
????//設置窗體標題欄隱藏
????this->setWindowFlags(Qt::framelessWindowHint?|?Qt::WindowSystemMenuHint?|?Qt::WindowMinMaxButtonsHint);
????location?=?this->geometry();
????max?=?false;
????mousePressed?=?false;

????//安裝事件監聽器讓標題欄識別鼠標雙擊
????ui->lab_title->installEventFilter(this);

????Iconhelper::Instance()->SetIcon(ui->btnMenu_Close?QChar(0xf00d)?10);
????Iconhelper::Instance()->SetIcon(ui->btnMenu_Max?QChar(0xf096)?10);
????Iconhelper::Instance()->SetIcon(ui->btnMenu_Min?QChar(0xf068)?10);
????Iconhelper::Instance()->SetIcon(ui->btnMenu?QChar(0xf0c9)?10);
????Iconhelper::Instance()->SetIcon(ui->lab_Ico?QChar(0xf015)?12);
}

bool?frmMain::eventFilter(Qobject?*obj?QEvent?*event)
{
????if?(event->type()?==?QEvent::MouseButtondblclick)?{
????????this->on_btnMenu_Max_clicked();
????????return?true;
????}
????return?Qobject::eventFilter(obj?event);
}

void?frmMain::mouseMoveEvent(QMouseEvent?*e)
{
????if?(mousePressed?&&?(e->buttons()?&&?Qt::LeftButton)?&&?!max)?{
????????this->move(e->globalPos()?-?mousePoint);
????????e->accept();
????}
}

void?frmMain::mousePressEvent(QMouseEvent?*e)
{
????if?(e->button()?==?Qt::LeftButton)?{
????????mousePressed?=?true;
????????mousePoint?=?e->globalPos()?-?this->pos();
????????e->accept();
????}
}

void?frmMain::mouseReleaseEvent(QMouseEvent?*)
{
????mousePressed?=?false;
}

void?frmMain::on_btnMenu_Close_clicked()
{
????qApp->exit();
}

void?frmMain::on_btnMenu_Max_clicked()
{
????if?(max)?{
????????this->setGeometry(location);
????????Iconhelper::Instance()->SetIcon(ui->btnMenu_Max?QChar(0xf096)?10);
????????ui->btnMenu_Max->setToolTip(“最大化“);
????}?else?{
????????location?=?this->geometry();
????????this->setGeometry(qApp->desktop()->availableGeometry());
????????Iconhelper::Instance()->SetIcon(ui->btnMenu_Max?QChar(0xf079)?10);
????????ui->btnMenu_Max->setToolTip(“還原“);
????}
????max?=?!max;
}

void?frmMain::on_btnMenu_Min_clicked()
{
????this->showMinimized();
}

void?frmMain::on_pushButton_clicked()
{
????myHelper::ShowMessageBoxInfo(“恭喜你獲得我公司送出的1000萬元大禮一份!“);
}

void?frmMain::on_pushButton_2_clicked()
{
????int?result?=?myHelper::ShowMessageBoxQuesion(“確定真的不要我了嗎?“);
????if?(result?==?1)?{
????????myHelper::ShowMessageBoxInfo(“你好狠心啊!“);
????}?else?{
????????myHelper::ShowMessageBoxInfo(“親愛的我就知道你不會離開我的!“);
????}
}

void?frmMain::on_pushButton_3_clicked()
{
????myHelper::ShowMessageBoxError(“天空飄來五個字!“);
}

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件???????2153??2014-08-15?16:44??frmmessagebox.cpp

?????文件????????716??2014-08-15?16:44??frmmessagebox.h

?????文件???????9558??2014-08-15?08:48??frmmessagebox.ui

?????文件????????633??2014-08-10?16:46??iconhelper.cpp

?????文件????????789??2014-07-29?16:38??iconhelper.h

?????文件????????461??2014-08-15?17:30??main.cpp

?????文件?????363566??2014-03-27?16:18??main.ico

?????文件????????881??2014-07-31?08:40??main.rc

?????文件???????3042??2014-08-15?16:43??myhelper.h

?????文件????????643??2014-08-15?14:46??QUI.pro

?????文件??????23634??2018-12-14?21:13??QUI.pro.user

?????文件??????23569??2014-08-15?20:36??QUI.pro.user.3.2-pre1

?????文件????????835??2014-08-15?15:14??rc.qrc

?????文件????????151??2014-08-05?22:44??image\add-line_horizontal.png

?????文件???????2837??2013-09-11?14:33??image\add-line_vertical.png

?????文件???????2837??2013-09-11?14:33??image\array_down.png

?????文件???????8377??2014-08-14?19:37??image\black.css

?????文件???????8377??2014-08-14?19:38??image\blue.css

?????文件????????691??2014-05-23?17:01??image\checkbox_checked.png

?????文件????????581??2014-05-23?17:01??image\checkbox_unchecked.png

?????文件???????2477??2013-05-26?10:35??image\error.png

?????文件?????594652??2014-07-29?15:25??image\Font?Awesome?Cheatsheet.png

?????文件?????141564??2014-08-05?01:29??image\fontawesome-webfont.ttf

?????文件???????8377??2014-08-14?19:38??image\gray.css

?????文件???????2956??2013-05-26?10:35??image\info.png

?????文件???????8377??2014-08-14?19:38??image\navy.css

?????文件?????117337??2010-09-13?14:02??image\qt_zh_CN.qm

?????文件???????3954??2013-05-26?10:35??image\question.png

?????文件????????888??2014-05-23?17:01??image\radio_normal.png

?????文件???????1024??2014-05-23?17:01??image\radio_selected.png

............此處省略9個文件信息

評論

共有 條評論