zoukankan      html  css  js  c++  java
  • [置顶] 关于Qt的学习

    初学习QT,希望用此来记录学习的轨迹.......

    1、Qt版本为Qt5.1.0

    2、使用Qt-Creator进行变成。

    3、第一个例子 打印出“Hello World”

    3.1  打开Qt-Creator

    3.2 点击新建->弹出新建对话框,项目选择为:应用程序->Qt 控制台应用。

    3.3 选择项目要保存的路径。

    3.4 选择构建套件,此处主要是对Qt程序编译器的选择。

    3.5 点击完成。

    #include <QCoreApplication>

    #include<QDebug>
    
    
    intmain(intargc,char*argv[])
    {
    QCoreApplicationa(argc,argv);
    
    
    qDebug() << "Hello World";
    
    
    returna.exec();
    }
     
    以上标红为输入的代码。
     
    对于以上代码进行解析:
    1、 #include<QCoreApplication>

    The QCoreApplication class provides an event loop for console Qt applications.

    This class is used by non-GUI applications to provide their event loop. For non-GUI application that uses Qt, there should be exactly one QCoreApplication object. For GUI applications, see QApplication.

    QCoreApplication contains the main event loop, where all events from the operating system (e.g., timer and network events) and other sources are processed and dispatched. It also handles the application's initialization and finalization, as well as system-wide and application-wide settings.

    2、#include<QDebugg>

    The QDebug class provides an output stream for debugging information.

    QDebug is used whenever the developer needs to write out debugging or tracing information to a device, file, string or console.

    In the common case, it is useful to call the qDebug() function to obtain a default QDebug object to use for writing debugging information。

  • 相关阅读:
    HANDLER进行堆叠注入
    CDUT第一届信安大挑战Re-wp
    Nu1LBook第一章wp
    Linux和VMWare
    [MRCTF]Xor
    IDA 调整栈帧 (411A04:positive sp value has been found)
    [BUU] 简单注册器
    2020年“安洵杯”四川省大学生信息安全技术大赛 部分WRITEUP
    关于我的pip不听话,总是说【Fatal error in launcher: Unable to create process using '"'】这件事
    C语言的PELode编写记录
  • 原文地址:https://www.cnblogs.com/suncoolcat/p/3283483.html
Copyright © 2011-2022 走看看