Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
FMVip_LXJ
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhenfei.zhang
FMVip_LXJ
Commits
7f4a72c1
Commit
7f4a72c1
authored
Mar 09, 2018
by
NitefullWind
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. 弹窗后向自己发送点击事件以获取焦点。
parent
ee1406af
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
FMVip_LXJ/windows/fmvipwnd.cpp
+14
-0
FMVip_LXJ/windows/fmvipwnd.h
+3
-0
No files found.
FMVip_LXJ/windows/fmvipwnd.cpp
View file @
7f4a72c1
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
#include <QStyleOption>
#include <QStyleOption>
#include <QJsonDocument>
#include <QJsonDocument>
#include <QKeyEvent>
#include <QKeyEvent>
#include <QTimer>
#ifdef Q_OS_WIN
#ifdef Q_OS_WIN
#include <windows.h>
#include <windows.h>
#include <windowsx.h>
#include <windowsx.h>
...
@@ -31,6 +32,13 @@ void FMVipWnd::on_close_btn_clicked()
...
@@ -31,6 +32,13 @@ void FMVipWnd::on_close_btn_clicked()
this
->
done
(
-
1
);
this
->
done
(
-
1
);
}
}
void
FMVipWnd
::
onWindowShown
()
{
SetCursorPos
(
_centerPoint
.
x
(),
_centerPoint
.
y
());
mouse_event
(
MOUSEEVENTF_LEFTDOWN
|
MOUSEEVENTF_ABSOLUTE
,
_centerPoint
.
x
(),
_centerPoint
.
y
(),
0
,
0
);
mouse_event
(
MOUSEEVENTF_LEFTUP
|
MOUSEEVENTF_ABSOLUTE
,
_centerPoint
.
x
(),
_centerPoint
.
y
(),
0
,
0
);
}
bool
FMVipWnd
::
close
()
bool
FMVipWnd
::
close
()
{
{
if
(
loadingWindow
!=
nullptr
)
{
if
(
loadingWindow
!=
nullptr
)
{
...
@@ -63,6 +71,12 @@ int FMVipWnd::exec()
...
@@ -63,6 +71,12 @@ int FMVipWnd::exec()
QRect
rc
=
w
.
availableGeometry
();
QRect
rc
=
w
.
availableGeometry
();
setGeometry
((
rc
.
width
()
-
width
())
/
2
,
(
rc
.
height
()
-
height
())
/
2
,
width
(),
height
());
setGeometry
((
rc
.
width
()
-
width
())
/
2
,
(
rc
.
height
()
-
height
())
/
2
,
width
(),
height
());
_centerPoint
=
rc
.
center
();
QTimer
t
;
t
.
singleShot
(
5
,
this
,
&
FMVipWnd
::
onWindowShown
);
t
.
start
();
return
QDialog
::
exec
();
return
QDialog
::
exec
();
}
}
...
...
FMVip_LXJ/windows/fmvipwnd.h
View file @
7f4a72c1
...
@@ -26,8 +26,11 @@ public:
...
@@ -26,8 +26,11 @@ public:
public
slots
:
public
slots
:
void
on_close_btn_clicked
();
void
on_close_btn_clicked
();
void
onWindowShown
();
private
:
private
:
FMLoading
*
loadingWindow
;
FMLoading
*
loadingWindow
;
QPoint
_centerPoint
;
protected
:
protected
:
bool
_isBusy
;
bool
_isBusy
;
Session
*
_session
;
Session
*
_session
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment