1 Star 6 Fork 2

jiangtao / GoSlowDetection

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
main.cpp 1.55 KB
一键复制 编辑 原始数据 按行查看 历史
jiangtao 提交于 2022-03-10 11:04 . 超时显示windows更新模拟界面
/************************************************************************************
<GoSlowDetection> Copyright (C) <2021> <Tao Kiang>
This program comes with ABSOLUTELY NO WARRANTY;
This is free software, and you are welcome to redistribute it
under certain conditions;
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
************************************************************************************/
#include "mainwindow.h"
#include <QApplication>
#include <QSharedMemory>
#include <QMessageBox>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QSharedMemory shared_memory("onlyOneGoslowDetection");//禁止躲开
if(shared_memory.attach())
{
QMessageBox::warning(nullptr, "警告","小伙子,你想干嘛\n软件不是已经打开了吗!", QMessageBox::Ok);
return 0;
}
if(!shared_memory.create(1))
return 0;
MainWindow w;
w.show();
return a.exec();
}
C++
1
https://gitee.com/jiangtao008/GoSlowDetection.git
git@gitee.com:jiangtao008/GoSlowDetection.git
jiangtao008
GoSlowDetection
GoSlowDetection
master

搜索帮助