1 Star 0 Fork 5

注意颈椎歇会靠着坐多喝水/learnOSG

forked from dcxcn/learnOSG 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
main.cpp 1.83 KB
一键复制 编辑 原始数据 按行查看 历史
JunhuiLee 提交于 2020-03-02 20:07 +08:00 . 更新
#include <QApplication>
#include "OSGQt_Romaing/osg_romaingwindow.h"
#include <QString>
#include <QCoreApplication>
#include <QSettings>
#include <QDialog>
#include <QDebug>
#include <QFile>
//检测内存泄漏
#include <vld.h>
void writeRegedit(QString key, QString val)
{
QSettings Setting(QSettings::NativeFormat, QSettings::SystemScope,
QCoreApplication::organizationName(), QCoreApplication::applicationName());
Setting.setValue(key, val);
}
QString getRegedit(QString key)
{
QSettings Setting(QSettings::NativeFormat, QSettings::SystemScope,
QCoreApplication::organizationName(), QCoreApplication::applicationName());
QString val = Setting.value(key).toString();
return val;
}
void removeRegedit(QString key)
{
QSettings Setting(QSettings::NativeFormat, QSettings::SystemScope,
QCoreApplication::organizationName(), QCoreApplication::applicationName());
Setting.remove(key);
}
QByteArray randomBinaryString(int length)
{
char *buf = new char[length];
for(int i = 0; i < length; i++)
buf[i] = rand() % 255 + 1;
QByteArray temp(buf);
return temp;
}
int main(int argc, char *argv[])
{
//管理员权限测试:
//结果:使用.manifest + mt.exe附加管理员权限
QApplication a(argc, argv);
// QCoreApplication::setOrganizationName("South China University of Technology");
// QCoreApplication::setApplicationName("Xiao Neng Ruan Jian");
// writeRegedit("cd", "hhh");
// auto val = getRegedit("cd");
// removeRegedit("cd");
// removeRegedit("cdKey");
// OSG_RomaingWindow w;
// w.show();
auto temp = OSG_RomaingWindow::getInstance();
temp->show();
// if(val.isNull())
// {
// }
// else
// {
// QDialog *b = new QDialog;
// b->show();
// }
return a.exec();
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/fbing2015/learnOSG.git
git@gitee.com:fbing2015/learnOSG.git
fbing2015
learnOSG
learnOSG
master

搜索帮助