1 Star 1 Fork 0

zinface/learning_deepin-deb-installer

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
main.cpp 1.03 KB
一键复制 编辑 原始数据 按行查看 历史
#include "debinstaller.h"
#include <DApplication>
#include <QCommandLineParser>
#include <QDebug>
#include <QTimer>
DWIDGET_USE_NAMESPACE
int main(int argc, char *argv[])
{
DApplication::loadDXcbPlugin();
DApplication app(argc, argv);
app.setOrganizationName("deepin");
app.setApplicationName("MDM_INSTALLER");
app.setApplicationVersion("1.0");
app.setTheme("light");
// command line arguments
QCommandLineParser parser;
parser.setApplicationDescription("Deepin deb package installer.");
parser.addHelpOption();
parser.addVersionOption();
parser.addPositionalArgument("filename", QApplication::translate("main", "Deb Package path."), "file [file..]");
parser.process(app);
const QStringList file_list = parser.positionalArguments();
qDebug() << file_list;
DebInstaller w;
w.show();
// select files from args
if(!file_list.isEmpty())
QMetaObject::invokeMethod(&w, "onPackagesSelected", Qt::QueuedConnection, Q_ARG(QStringList, file_list));
return app.exec();
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zinface/learning_deepin-deb-installer.git
git@gitee.com:zinface/learning_deepin-deb-installer.git
zinface
learning_deepin-deb-installer
learning_deepin-deb-installer
master

搜索帮助