先提交下
parent
442feb1283
commit
e3c650dbfd
|
@ -100,10 +100,11 @@
|
||||||
<ClInclude Include="buttonstruct.h" />
|
<ClInclude Include="buttonstruct.h" />
|
||||||
<ClInclude Include="config.h" />
|
<ClInclude Include="config.h" />
|
||||||
<ClInclude Include="globalvariables.h" />
|
<ClInclude Include="globalvariables.h" />
|
||||||
|
<QtMoc Include="qminiblink.h" />
|
||||||
|
<ClInclude Include="wke.h" />
|
||||||
<QtMoc Include="mainwindowlayout.h" />
|
<QtMoc Include="mainwindowlayout.h" />
|
||||||
<QtMoc Include="mainwindow.h" />
|
<QtMoc Include="mainwindow.h" />
|
||||||
<QtMoc Include="mainscreen.h" />
|
<QtMoc Include="mainscreen.h" />
|
||||||
<ClInclude Include="mb.h" />
|
|
||||||
<QtMoc Include="MyButton.h" />
|
<QtMoc Include="MyButton.h" />
|
||||||
<QtMoc Include="netio.h" />
|
<QtMoc Include="netio.h" />
|
||||||
<QtMoc Include="navbar.h" />
|
<QtMoc Include="navbar.h" />
|
||||||
|
@ -116,12 +117,14 @@
|
||||||
<ClCompile Include="MyButton.cpp" />
|
<ClCompile Include="MyButton.cpp" />
|
||||||
<ClCompile Include="navbar.cpp" />
|
<ClCompile Include="navbar.cpp" />
|
||||||
<ClCompile Include="netio.cpp" />
|
<ClCompile Include="netio.cpp" />
|
||||||
|
<ClCompile Include="qminiblink.cpp" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<QtUic Include="mainscreen.ui" />
|
<QtUic Include="mainscreen.ui" />
|
||||||
<QtUic Include="mainwindow.ui" />
|
<QtUic Include="mainwindow.ui" />
|
||||||
<QtUic Include="mainwindowlayout.ui" />
|
<QtUic Include="mainwindowlayout.ui" />
|
||||||
<QtUic Include="navbar.ui" />
|
<QtUic Include="navbar.ui" />
|
||||||
|
<QtUic Include="qminiblink.ui" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<ImportGroup Condition="Exists('$(QtMsBuild)\qt.targets')">
|
<ImportGroup Condition="Exists('$(QtMsBuild)\qt.targets')">
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
<ClInclude Include="globalvariables.h">
|
<ClInclude Include="globalvariables.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="mb.h">
|
<ClInclude Include="wke.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
@ -60,6 +60,9 @@
|
||||||
<QtMoc Include="MyButton.h">
|
<QtMoc Include="MyButton.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</QtMoc>
|
</QtMoc>
|
||||||
|
<QtMoc Include="qminiblink.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</QtMoc>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="main.cpp">
|
<ClCompile Include="main.cpp">
|
||||||
|
@ -83,6 +86,9 @@
|
||||||
<ClCompile Include="netio.cpp">
|
<ClCompile Include="netio.cpp">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="qminiblink.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<QtUic Include="navbar.ui">
|
<QtUic Include="navbar.ui">
|
||||||
|
@ -97,5 +103,8 @@
|
||||||
<QtUic Include="mainwindowlayout.ui">
|
<QtUic Include="mainwindowlayout.ui">
|
||||||
<Filter>Form Files</Filter>
|
<Filter>Form Files</Filter>
|
||||||
</QtUic>
|
</QtUic>
|
||||||
|
<QtUic Include="qminiblink.ui">
|
||||||
|
<Filter>Form Files</Filter>
|
||||||
|
</QtUic>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
|
@ -5,9 +5,9 @@
|
||||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<QtLastBackgroundBuild>2023-07-29T22:55:59.2650920Z</QtLastBackgroundBuild>
|
<QtLastBackgroundBuild>2023-07-30T09:15:49.0117730Z</QtLastBackgroundBuild>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<QtLastBackgroundBuild>2023-07-29T22:56:00.1037375Z</QtLastBackgroundBuild>
|
<QtLastBackgroundBuild>2023-07-30T09:15:57.3451755Z</QtLastBackgroundBuild>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
|
@ -9,71 +9,70 @@
|
||||||
#include "netio.h"
|
#include "netio.h"
|
||||||
#include <QPixmap>
|
#include <QPixmap>
|
||||||
#include <exception>
|
#include <exception>
|
||||||
|
#include <QResizeEvent>
|
||||||
|
|
||||||
|
|
||||||
MainScreen::MainScreen(QWidget *parent) :
|
MainScreen::MainScreen(QWidget *parent) :
|
||||||
QWidget(parent), ui(new Ui::MainScreen) {
|
QWidget(parent), ui(new Ui::MainScreen) {
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
layout = nullptr;
|
broswer = new QWidget(this);
|
||||||
layout_left = nullptr;
|
button = new QPushButton(this);
|
||||||
broswer = nullptr;
|
button->setHidden(true);
|
||||||
}
|
|
||||||
|
|
||||||
MainScreen::~MainScreen() {
|
|
||||||
delete ui;
|
|
||||||
}
|
|
||||||
void MainScreen::clickButton1(QString text, QString url) {
|
|
||||||
LRESULT *result=new LRESULT;
|
|
||||||
try {
|
|
||||||
mbFireWindowsMessage(mbView, mbGetHostHWND(mbView), WM_DESTROY, 0, 0, result);
|
|
||||||
delete result;
|
|
||||||
}
|
|
||||||
catch(std::exception e){
|
|
||||||
delete result;
|
|
||||||
}
|
|
||||||
if (text == "΢ÐŶ࿪") {
|
|
||||||
if (layout == nullptr) {
|
|
||||||
layout = new QHBoxLayout;
|
|
||||||
button = new QPushButton;
|
|
||||||
button->setStyleSheet("border-style:none;padding:10px;border-radius:5px;background-color:#FFFFFF");
|
button->setStyleSheet("border-style:none;padding:10px;border-radius:5px;background-color:#FFFFFF");
|
||||||
//Plus Math icon by Icons8
|
//Plus Math icon by Icons8
|
||||||
QString dir = QApplication::applicationDirPath();
|
QString dir = QApplication::applicationDirPath();
|
||||||
icon = new QIcon(dir + "/images/add.png");
|
icon = new QIcon(dir + "/images/add.png");
|
||||||
button->setIcon(*icon);
|
button->setIcon(*icon);
|
||||||
connect(button, &QPushButton::click, this, &MainScreen::startWeChat);
|
layout = new QHBoxLayout;
|
||||||
layout->addWidget(button, 1);
|
|
||||||
if (broswer == nullptr) {
|
|
||||||
broswer = new QWidget;
|
|
||||||
}
|
|
||||||
layout->addWidget(broswer,4);
|
layout->addWidget(broswer,4);
|
||||||
this->setLayout(layout);
|
this->setLayout(layout);
|
||||||
mbView = mbCreateWebWindow(MB_WINDOW_TYPE_CONTROL, (HWND)broswer->winId(), 0, 0, broswer->width(), broswer->height());
|
//QSizePolicy sizePolicy(QSizePolicy::Policy::Expanding, QSizePolicy::QSizePolicy::Expanding);
|
||||||
mbShowWindow(mbView, TRUE);
|
//broswer->setSizePolicy(sizePolicy);
|
||||||
mbLoadURL(mbView, url.toStdString().c_str());
|
miniblink = new QMiniBlink(broswer,this);
|
||||||
mbRunMessageLoop();
|
miniblink->show();
|
||||||
mbUninit();
|
//miniblink->setSizePolicy(sizePolicy);
|
||||||
|
thread = new QThread;
|
||||||
|
miniblink->moveToThread(thread);
|
||||||
|
connect(thread, &QThread::started, miniblink, &QMiniBlink::init);
|
||||||
|
connect(thread, &QThread::finished, thread, &QThread::deleteLater);
|
||||||
|
connect(this, &MainScreen::destroy, miniblink, &QMiniBlink::destroy);
|
||||||
|
connect(this, &MainScreen::changeUrl, miniblink, &QMiniBlink::switchUrl);
|
||||||
|
thread->start();
|
||||||
|
}
|
||||||
|
|
||||||
|
MainScreen::~MainScreen() {
|
||||||
|
|
||||||
|
delete ui;
|
||||||
|
}
|
||||||
|
void MainScreen::clickButton1(QString text, QString url) {
|
||||||
|
if (text == QString::fromLocal8Bit("΢ÐŶ࿪")) {
|
||||||
|
button->setHidden(false);
|
||||||
|
connect(button, &QPushButton::click, this, &MainScreen::startWeChat);
|
||||||
|
if (button->layout() == nullptr) {
|
||||||
|
layout->insertWidget(1, button);
|
||||||
|
}
|
||||||
|
if (broswer->layout() == nullptr) {
|
||||||
|
layout->addWidget(broswer, 4);
|
||||||
|
}
|
||||||
|
emit changeUrl(url);
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
mbView = mbCreateWebWindow(MB_WINDOW_TYPE_CONTROL, (HWND)broswer->winId(), 0, 0, broswer->width(), broswer->height());
|
if (button->layout() != nullptr) {
|
||||||
mbShowWindow(mbView, TRUE);
|
layout->removeWidget(button);
|
||||||
mbLoadURL(mbView, url.toStdString().c_str());
|
button->setHidden(true);
|
||||||
mbRunMessageLoop();
|
|
||||||
mbUninit();
|
|
||||||
}
|
}
|
||||||
}
|
emit changeUrl(url);
|
||||||
else {
|
|
||||||
if (broswer == nullptr) {
|
|
||||||
broswer = new QWidget;
|
|
||||||
}
|
|
||||||
setLayout(nullptr);
|
|
||||||
broswer->setGeometry(0, 0, width(), height());
|
|
||||||
mbView = mbCreateWebWindow(MB_WINDOW_TYPE_CONTROL, (HWND)broswer->winId(), 0, 0, broswer->width(), broswer->height());
|
|
||||||
mbShowWindow(mbView, TRUE);
|
|
||||||
mbLoadURL(mbView, url.toStdString().c_str());
|
|
||||||
mbRunMessageLoop();
|
|
||||||
mbUninit();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void MainScreen::startWeChat() {
|
void MainScreen::startWeChat() {
|
||||||
ShellExecute(GetDesktopWindow(), L"open", L"wxdk.exe", L"", QApplication::applicationDirPath().toStdWString().c_str(), SW_SHOW);
|
QString path = QApplication::applicationDirPath();
|
||||||
|
QString exe = path + "/wxdk.exe";
|
||||||
|
ShellExecute(GetDesktopWindow(), L"open", exe.toStdWString().c_str(), L"", path.toStdWString().c_str(), SW_SHOW);
|
||||||
}
|
}
|
||||||
|
//void MainScreen::resizeEvent(QResizeEvent *event) {
|
||||||
|
// QWidget::resizeEvent(event);
|
||||||
|
// //broswer->resize(event->size().width() / 5 * 4, event->size().height());
|
||||||
|
// miniblink->resize(event->size().width() / 5 * 4, event->size().height());
|
||||||
|
// miniblink->update();
|
||||||
|
//}
|
||||||
|
|
|
@ -9,7 +9,8 @@
|
||||||
#include <QHBoxLayout>
|
#include <QHBoxLayout>
|
||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
#include "mb.h"
|
#include "wke.h"
|
||||||
|
#include "qminiblink.h"
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
namespace Ui { class MainScreen; }
|
namespace Ui { class MainScreen; }
|
||||||
|
@ -17,12 +18,16 @@ QT_END_NAMESPACE
|
||||||
|
|
||||||
class MainScreen : public QWidget {
|
class MainScreen : public QWidget {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
signals:
|
||||||
|
void destroy();
|
||||||
|
void changeUrl(QString url);
|
||||||
public:
|
public:
|
||||||
explicit MainScreen(QWidget *parent = nullptr);
|
explicit MainScreen(QWidget *parent = nullptr);
|
||||||
~MainScreen() override;
|
~MainScreen() override;
|
||||||
public slots:
|
public slots:
|
||||||
void clickButton1(QString text, QString url);
|
void clickButton1(QString text, QString url);
|
||||||
|
protected:
|
||||||
|
//void resizeEvent(QResizeEvent *event) override;
|
||||||
private:
|
private:
|
||||||
Ui::MainScreen *ui;
|
Ui::MainScreen *ui;
|
||||||
QHBoxLayout *layout;
|
QHBoxLayout *layout;
|
||||||
|
@ -30,9 +35,12 @@ private:
|
||||||
QPushButton *button;
|
QPushButton *button;
|
||||||
QIcon *icon;
|
QIcon *icon;
|
||||||
QWidget *broswer;
|
QWidget *broswer;
|
||||||
mbWebView mbView;
|
static bool isInited();
|
||||||
|
QThread *thread;
|
||||||
|
QMiniBlink *miniblink;
|
||||||
private slots:
|
private slots:
|
||||||
void startWeChat();
|
void startWeChat();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -19,10 +19,10 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||||
setCentralWidget(mainWindowLayout);
|
setCentralWidget(mainWindowLayout);
|
||||||
if(deskRect.width()*scale>1920){
|
if(deskRect.width()*scale>1920){
|
||||||
resize(1600,1080);
|
resize(1600,1080);
|
||||||
this->setMaximumWidth(1600);
|
//this->setMaximumWidth(1600);
|
||||||
}else{
|
}else{
|
||||||
resize(800, 540);
|
resize(800, 540);
|
||||||
this->setMaximumWidth(800);
|
//this->setMaximumWidth(800);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -17,12 +17,12 @@ MainWindowLayout::MainWindowLayout(QWidget *parent) :
|
||||||
configRequest->sendRequest(configResponse);
|
configRequest->sendRequest(configResponse);
|
||||||
navBar=new NavBar(configResponse,this);
|
navBar=new NavBar(configResponse,this);
|
||||||
mainScreen=new MainScreen();
|
mainScreen=new MainScreen();
|
||||||
//QSizePolicy sizePolicy(QSizePolicy::Policy::Fixed, QSizePolicy::QSizePolicy::Fixed);
|
|
||||||
//navBar->setSizePolicy(sizePolicy);
|
|
||||||
layout->setMargin(0);
|
layout->setMargin(0);
|
||||||
layout->addWidget(navBar,1);
|
layout->addWidget(navBar,1);
|
||||||
layout->addWidget(mainScreen,4);
|
layout->addWidget(mainScreen,7);
|
||||||
setLayout(layout);
|
setLayout(layout);
|
||||||
|
connect(this, &MainWindowLayout::clickButton1, mainScreen, &MainScreen::clickButton1);
|
||||||
}
|
}
|
||||||
|
|
||||||
MainWindowLayout::~MainWindowLayout() {
|
MainWindowLayout::~MainWindowLayout() {
|
||||||
|
@ -35,13 +35,15 @@ MainWindowLayout::~MainWindowLayout() {
|
||||||
|
|
||||||
void MainWindowLayout::resizeEvent(QResizeEvent *event) {
|
void MainWindowLayout::resizeEvent(QResizeEvent *event) {
|
||||||
QWidget::resizeEvent(event);
|
QWidget::resizeEvent(event);
|
||||||
navBar->resize(navBar->width(),height()/5);
|
navBar->resize(navBar->width(),height()/8);
|
||||||
//layout->setAlignment(Qt::AlignmentFlag::AlignHCenter);
|
//layout->setAlignment(Qt::AlignmentFlag::AlignHCenter);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindowLayout::clickButton(QString text, QString url) {
|
void MainWindowLayout::clickButton(QString text, QString url) {
|
||||||
if (text == "¼ÆËãÆ÷") {
|
QString path = QApplication::applicationDirPath();
|
||||||
ShellExecute(GetDesktopWindow(), L"open", L"startclas.exe", L"", QApplication::applicationDirPath().toStdWString().c_str(), SW_SHOW);
|
path += "/startcalc.exe";
|
||||||
|
if (text== QString::fromLocal8Bit("¼ÆËãÆ÷")) {
|
||||||
|
WinExec(path.toStdString().c_str(), SW_SHOW);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
emit clickButton1(text, url);
|
emit clickButton1(text, url);
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -26,16 +26,17 @@ NavBar::NavBar(ConfigResponse *configResponse,QWidget *parent) :
|
||||||
else {
|
else {
|
||||||
getLogoFromLocal();
|
getLogoFromLocal();
|
||||||
}
|
}
|
||||||
|
this->setLayout(nullptr);
|
||||||
int n = buttonStructs.length();
|
int n = buttonStructs.length();
|
||||||
int x = (width() - height()*n) / 2;
|
int x = (width() - height()*n) / 2;
|
||||||
for (auto buttonStruct : buttonStructs) {
|
for (auto buttonStruct : buttonStructs) {
|
||||||
MyButton *myButton = new MyButton(buttonStruct, height(), height(), &buttons);
|
MyButton *myButton = new MyButton(buttonStruct, height(), height(), &buttons,this);
|
||||||
myButton->setGeometry(x, 0, height(), height());
|
myButton->setGeometry(x, 0, height(), height());
|
||||||
|
myButton->show();
|
||||||
connect(myButton, &MyButton::clicked1, mainWindowLayout, &MainWindowLayout::clickButton);
|
connect(myButton, &MyButton::clicked1, mainWindowLayout, &MainWindowLayout::clickButton);
|
||||||
x += height();
|
x += height();
|
||||||
buttons << myButton;
|
buttons << myButton;
|
||||||
}
|
}
|
||||||
this->setLayout(nullptr);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NavBar::~NavBar() {
|
NavBar::~NavBar() {
|
||||||
|
|
|
@ -0,0 +1,48 @@
|
||||||
|
#include "qminiblink.h"
|
||||||
|
#pragma comment (lib,"Comctl32.lib")
|
||||||
|
|
||||||
|
QMiniBlink::QMiniBlink(QWidget *broswer,QWidget *parent)
|
||||||
|
: QWidget(parent){
|
||||||
|
this->broswer = broswer;
|
||||||
|
//QSizePolicy sizePolicy(QSizePolicy::Policy::Expanding, QSizePolicy::QSizePolicy::Expanding);
|
||||||
|
//setSizePolicy(sizePolicy);
|
||||||
|
}
|
||||||
|
void QMiniBlink::init() {
|
||||||
|
ui.setupUi(this);
|
||||||
|
wkeInit();
|
||||||
|
wkeView = wkeCreateWebWindow(WKE_WINDOW_TYPE_CONTROL, (HWND)this->winId(), 0, 0, this->width(), this->height());
|
||||||
|
wkeSetNavigationToNewWindowEnable(wkeView, false);
|
||||||
|
wkeShowWindow(wkeView, TRUE);
|
||||||
|
SetParent(wkeGetWindowHandle(wkeView), (HWND)this->winId());
|
||||||
|
SetWindowSubclass((HWND)this->winId(), subClassProc, 0, (DWORD_PTR)this);
|
||||||
|
wkeRunMessageLoop();
|
||||||
|
}
|
||||||
|
QMiniBlink::~QMiniBlink(){}
|
||||||
|
void QMiniBlink::destroy() {
|
||||||
|
wkeDestroyWebView(wkeView);
|
||||||
|
}
|
||||||
|
|
||||||
|
void QMiniBlink::switchUrl(QString url) {
|
||||||
|
wkeLoadURL(wkeView, url.toStdString().c_str());
|
||||||
|
}
|
||||||
|
LRESULT CALLBACK QMiniBlink::subClassProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, UINT_PTR uIdSubclass, DWORD_PTR dwRefData)
|
||||||
|
{
|
||||||
|
QMiniBlink *obj = (QMiniBlink *)dwRefData;
|
||||||
|
if (obj == nullptr)
|
||||||
|
return DefSubclassProc(hWnd, uMsg, wParam, lParam);
|
||||||
|
switch (uMsg) {
|
||||||
|
case WM_SIZE:
|
||||||
|
obj->autojustWebViewSize();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return DefSubclassProc(hWnd, uMsg, wParam, lParam);
|
||||||
|
}
|
||||||
|
void QMiniBlink::autojustWebViewSize()
|
||||||
|
{
|
||||||
|
RECT rect;
|
||||||
|
GetWindowRect((HWND)this->winId(), &rect);
|
||||||
|
wkeMoveWindow(wkeView, 0, 0, rect.right - rect.left, rect.bottom - rect.top);
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,26 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <QWidget>
|
||||||
|
#include "ui_qminiblink.h"
|
||||||
|
#include "wke.h"
|
||||||
|
#include <Windows.h>
|
||||||
|
#include <CommCtrl.h>
|
||||||
|
|
||||||
|
class QMiniBlink : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
QMiniBlink(QWidget *broswer,QWidget *parent = Q_NULLPTR);
|
||||||
|
~QMiniBlink();
|
||||||
|
void init();
|
||||||
|
void destroy();
|
||||||
|
void autojustWebViewSize();
|
||||||
|
public slots:
|
||||||
|
void switchUrl(QString url);
|
||||||
|
private:
|
||||||
|
Ui::QMiniBlink ui;
|
||||||
|
wkeWebView wkeView;
|
||||||
|
QWidget *broswer;
|
||||||
|
static LRESULT CALLBACK subClassProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, UINT_PTR uIdSubclass, DWORD_PTR dwRefData);
|
||||||
|
};
|
|
@ -0,0 +1,23 @@
|
||||||
|
<UI version="4.0" >
|
||||||
|
<class>QMiniBlink</class>
|
||||||
|
<widget class="QWidget" name="QMiniBlink" >
|
||||||
|
<property name="objectName" >
|
||||||
|
<string notr="true">QMiniBlink</string>
|
||||||
|
</property>
|
||||||
|
<property name="geometry" >
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>400</width>
|
||||||
|
<height>300</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle" >
|
||||||
|
<string>QMiniBlink</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<layoutDefault spacing="6" margin="11" />
|
||||||
|
<pixmapfunction></pixmapfunction>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</UI>
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue