zoukankan      html  css  js  c++  java
  • qt学习(九)Designer

    Designer

    1.新建->Application->Qt Widgets Application

    可以在ui里边编辑控件,通过转到槽设计槽函数

    2.多国语言-翻译家

     打开QT 预言家->新建短语书->发布

    在qt编程中translate

    3.command line(分析器)

    获取参数的值,以便后边用

    #include <QCoreApplication>
    #include <QCommandLineParser>
    #include <QDebug>
    #include <stdio.h>
    int main(int argc, char** argv)
    {
        QCoreApplication app(argc, argv);
    
        app.setApplicationVersion("1.0.0.0");
        app.setApplicationName("xxxx tools");
    
        QCommandLineParser parser;
        parser.addHelpOption();
        parser.addVersionOption();
    
        QCommandLineOption p(QStringList() << "p" << "package",
                             "set package name of Android", "com.itcast.hello");//描述
        parser.addOption(p);//创建p,并把p加入到解析器中
        QCommandLineOption l(QStringList() << "l" << "language",
                             "set code language c++ or lua", "c++");
        parser.addOption(l);
    
    //    parser.parse(app.arguments());
        parser.process(app);
    
        //解析参数p和l并打印出来
        QString strValue = parser.value("p"); /* package */
      //  qCritical() <<"p is"<< strValue;
        printf("p is %s
    ", strValue.toUtf8().data());
        strValue = parser.value("l"); /* language */
        printf("l is %s
    ", strValue.toUtf8().data());
    
    
       qDebug() << parser. positionalArguments();
    
        return 0;
    //    return app.exec();
       // return app.exec();
    }

    可以在以下位置加参数

    4.多媒体的控件很全面

    5.应用程序打包和资源

    .exe单独运行,缺什么库,在安装的QT目录中找什么库。

    也 可以打包为安装文件,需要下载一个压缩打包工具 Inoo Setup 5->Inno Setup Compiler->Create a new script file using the Script Wizard

    6.git版本控制系统

     gitd的详细讲解在传智播客QT的第四天的课程中有讲

  • 相关阅读:
    xshell使用密钥登陆服务器
    SQLyog使用隧道登陆数据库
    puttygen.exe生成ppk格式密钥
    xshell生成密钥对
    性能测试基础---jmeter函数二次开发
    Python:基础知识(二)
    异常点检测
    Python:numpy.newaxis
    三张图读懂机器学习:基本概念、五大流派与九种常见算法
    机器学习:样本集、验证集(开发集)、测试集
  • 原文地址:https://www.cnblogs.com/rainbow1122/p/8186021.html
Copyright © 2011-2022 走看看