資源簡介
一、運行環境:
win7+qt5.5.0 mingw編譯器
二、指紋儀設備:USB的中控live3指紋采集器
三、功能:
1、桌面應用程序可與網頁進行交互:采用webchannel技術,實現html與qt桌面程序的交互;
2、桌面程序通過調用設備的默認瀏覽器打開你要指定的html頁面;
3、桌面程序實現最小化,還有類似qq那樣接收到數據試時,最小化圖標會閃動;
4、最小化圖標右擊有其他功能選項,可以打開指紋模塊測試程序;
5、指紋模塊測試程序功能包含:指紋采集器開啟、關閉;指紋的采集和顯示;指紋模板生成、臨時錄入;指紋比對;指紋刪除;
6、可執行程序中可添加了版本號、軟件出處等信息
代碼片段和文件信息
#include?“basewindow.h“
#include?
#include?
#include?
#include?
baseWindow::baseWindow(QWidget?*parent)
????:?QWidget(parent)
{
????//?framelessWindowHint屬性設置窗口去除邊框;
????//?WindowMinimizeButtonHint?屬性設置在窗口最小化時,點擊任務欄窗口可以顯示出原窗口;
????this->setWindowFlags(Qt::framelessWindowHint?|?Qt::WindowMinimizeButtonHint);
????//?設置窗口背景透明;
????setAttribute(Qt::WA_TranslucentBackground);
????//?注意?。?!如果是主窗口不要設置WA_DeleteOnClose屬性;
????//?關閉窗口時釋放資源;
????setAttribute(Qt::WA_DeleteOnClose);
????//?初始化標題欄;
????inittitleBar();
}
baseWindow::~baseWindow()
{
}
void?baseWindow::inittitleBar()
{
????m_titleBar?=?new?MytitleBar(this);
????m_titleBar->move(0?0);
????connect(m_titleBar?SIGNAL(signalButtonMinClicked())?this?SLOT(onButtonMinClicked()));
????connect(m_titleBar?SIGNAL(signalButtonRestoreClicked())?this?SLOT(onButtonRestoreClicked()));
????connect(m_titleBar?SIGNAL(signalButtonMaxClicked())?this?SLOT(onButtonMaxClicked()));
????connect(m_titleBar?SIGNAL(signalButtonCloseClicked())?this?SLOT(onButtonCloseClicked()));
}
void?baseWindow::paintEvent(QPaintEvent*?event)
{
????//設置背景色;
????QPainter?painter(this);
????QPainterPath?pathBack;
????pathBack.setFillRule(Qt::WindingFill);
????pathBack.addRoundedRect(QRect(0?0?this->width()?this->height())?3?3);
????painter.setRenderHint(QPainter::SmoothPixmapTransform?true);
????painter.fillPath(pathBack?QBrush(QColor(238?223?204)));
????return?QWidget::paintEvent(event);
}
void?baseWindow::loadstyleSheet(const?QString?&sheetName)
{
????QFile?file(“:/“?+?sheetName?+?“.qss“);
????file.open(QFile::ReadOnly);
????if?(file.isOpen())
????{
????????QString?styleSheet?=?this->styleSheet();
????????styleSheet?+=?QLatin1String(file.readAll());
????????this->setstyleSheet(styleSheet);
????}
}
void?baseWindow::onButtonMinClicked()
{
????showMinimized();
}
void?baseWindow::onButtonRestoreClicked()
{
????QPoint?windowPos;
????QSize?windowSize;
????m_titleBar->getRestoreInfo(windowPos?windowSize);
????this->setGeometry(QRect(windowPos?windowSize));
}
void?baseWindow::onButtonMaxClicked()
{
????m_titleBar->saveRestoreInfo(this->pos()?QSize(this->width()?this->height()));
????QRect?desktopRect?=?QApplication::desktop()->availableGeometry();
????QRect?FactRect?=?QRect(desktopRect.x()?-?3?desktopRect.y()?-?3?desktopRect.width()?+?6?desktopRect.height()?+?6);
????setGeometry(FactRect);
}
void?baseWindow::onButtonCloseClicked()
{
????close();
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????726??2019-01-29?15:48??webchanneltest\.qmake.stash
?????文件???????2729??2019-02-22?15:19??webchanneltest\ba
?????文件????????573??2019-02-22?14:47??webchanneltest\ba
?????文件??????90624??2016-06-10?15:32??webchanneltest\bin\bearer\qgenericbearer.dll
?????文件??????82944??2016-06-10?15:32??webchanneltest\bin\bearer\qnativewifibearer.dll
?????文件????3550208??2017-11-30?10:56??webchanneltest\bin\D3Dcompiler_47.dll
?????文件??????42496??2016-06-11?01:51??webchanneltest\bin\iconengines\qsvgicon.dll
?????文件??????58880??2016-06-11?02:15??webchanneltest\bin\imageformats\qdds.dll
?????文件??????33792??2016-06-10?15:32??webchanneltest\bin\imageformats\qgif.dll
?????文件??????46592??2016-06-11?02:15??webchanneltest\bin\imageformats\qicns.dll
?????文件??????36352??2016-06-10?15:33??webchanneltest\bin\imageformats\qico.dll
?????文件?????258560??2016-06-10?15:32??webchanneltest\bin\imageformats\qjpeg.dll
?????文件??????28672??2016-06-11?01:51??webchanneltest\bin\imageformats\qsvg.dll
?????文件??????28672??2016-06-11?02:15??webchanneltest\bin\imageformats\qtga.dll
?????文件?????495616??2016-06-11?02:15??webchanneltest\bin\imageformats\qtiff.dll
?????文件??????27648??2016-06-11?02:15??webchanneltest\bin\imageformats\qwbmp.dll
?????文件?????416768??2016-06-11?02:16??webchanneltest\bin\imageformats\qwebp.dll
?????文件???????3323??2019-02-21?17:08??webchanneltest\bin\index.html
?????文件???????3087??2019-01-29?16:34??webchanneltest\bin\index2.html
?????文件??????22016??2016-06-10?15:16??webchanneltest\bin\libEGL.dll
?????文件?????120334??2015-12-29?06:25??webchanneltest\bin\libgcc_s_dw2-1.dll
?????文件????2801664??2016-06-10?15:16??webchanneltest\bin\libGLESV2.dll
?????文件????1540622??2015-12-29?06:25??webchanneltest\bin\libstdc++-6.dll
?????文件??????79360??2015-12-29?06:25??webchanneltest\bin\libwinpthread-1.dll
?????文件???15220736??2014-09-23?18:36??webchanneltest\bin\opengl32sw.dll
?????文件????1489920??2016-06-10?15:34??webchanneltest\bin\platforms\qwindows.dll
?????文件????5384704??2019-01-29?16:57??webchanneltest\bin\Qt5Core.dll
?????文件????5283840??2016-06-10?15:23??webchanneltest\bin\Qt5Gui.dll
?????文件????1610240??2016-06-10?15:17??webchanneltest\bin\Qt5Network.dll
?????文件?????357888??2015-06-29?18:54??webchanneltest\bin\Qt5PrintSupport.dll
............此處省略175個文件信息
評論
共有 條評論