初学习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。

[置顶] 关于Qt的学习的更多相关文章

  1. [置顶] 我的设计模式学习笔记------>Java设计模式总概况

    设计模式的概念最早起源于建筑设计大师Alexander的<建筑的永恒方法>一书,尽管Alexander的著作是针对建筑领域的,但是他的观点实际上用用于所有的工程设计领域,其中也包括软件设计 ...

  2. [置顶] 人工智能(深度学习)加速芯片论文阅读笔记 (已添加ISSCC17,FPGA17...ISCA17...)

    这是一个导读,可以快速找到我记录的关于人工智能(深度学习)加速芯片论文阅读笔记. ISSCC 2017 Session14 Deep Learning Processors: ISSCC 2017关于 ...

  3. [置顶] MySQL Cluster初步学习资料整理--安装部署新特性性能测试等

    1.1 mysql-cluster简介 简单的说,MySQLCluster实际上是在无共享存储设备的情况下实现的一种完全分布式数据库系统,其主要通过NDBCluster(简称NDB)存储引擎来实现. ...

  4. [置顶] 【C/C++学习】之十三、虚函数剖析

    所谓虚函数,虚就虚在“推迟联编”或者“动态联编”上,一个类函数的调用并不是在编译时刻被确定的,而是在运行时刻被确定的.由于编写代码的时候并不能确定被调用的是基类的函数还是哪个派生类的函数,所以被称为“ ...

  5. Qt中让Qwidget置顶的方法

    一般来是说窗体置顶和取消只要        setWindowFlags(Qt::WindowStaysOnTopHint);        setWindowFlags(Qt::Widget); 要 ...

  6. QT窗口置顶/真透明/背景模糊/非矩形/跳过任务栏分页器/无边框/无焦点点击/焦点穿透

    qt 窗口置顶/真透明/背景模糊/非矩形/跳过任务栏分页器/无边框/无焦点点击/焦点穿透 窗口置顶qt 里是 setWindowFlags(Qt::WindowStaysOnTopHint)kde 里 ...

  7. QT 窗口置顶功能

    Qt中,保持窗口置顶的设置为: Qt::WindowFlags m_flags = windowFlags(); setWindowFlags(m_flags | Qt::WindowStaysOnT ...

  8. Qt::QWindow多窗口争抢置顶状态解决方案

    有时候我们会有这种需求,自己的桌面程序需要置顶,但是程序包含了很多窗口,可能我们要求窗口1,2都在其它桌面程序之上,但是窗口1必须随时在窗口2之上. Qt提供的置顶方式是在windowsflags上增 ...

  9. Qt 窗口操作函数(置顶、全屏,最大化最小化按钮设置等)

    一.窗口置顶 与 取消置顶 void MainWindow::on_windowTopButton_clicked() { if (m_flags == NULL) { m_flags = windo ...

随机推荐

  1. Hibernate fetching strategies(抓取策略)

    抓取策略(fetching strategies)是指:当应用程序需要在(Hibernate实体对象图的)关联关系间进行导航的时候,Hibernate如何获取关联对象的策略.抓取策略可以在O/R映射的 ...

  2. Linux下解压缩 - 中文解决方案

    命令行工具 Unar 以及 Lsar 安装:sudo apt-get install unar: 预览压缩包:lsar example.zip 解压缩:unar example.zip 指定位置解压: ...

  3. 关于iis6.0远程溢出漏洞

    漏洞描述 漏洞编号:CVE-2017-7269 发现人员:Zhiniang Peng和Chen Wu(华南理工大学信息安全实验室,计算机科学与工程学院) 漏洞简述:开启WebDAV服务的IIS 6.0 ...

  4. SpringBoot 如何从前台传递数组

    1.SpringBoot 如何从前台传递数组 2.前台 $.ajax({ url: 'deleteBsGiftById', type: 'post', dataType: 'json', data: ...

  5. bzoj 3298: [USACO 2011Open]cow checkers -- 数学

    3298: [USACO 2011Open]cow checkers Time Limit: 10 Sec  Memory Limit: 128 MB Description 一天,Besssie准备 ...

  6. PHP -- 8个必备的PHP功能开发

    原文出处:http://www.codeceo.com/8-php-functions.html 做过PHP开发的程序员应该清楚,PHP中有很多内置的功能,掌握了它们,可以帮助你在做PHP开发时更加得 ...

  7. Are you sure your NDK_MODULE_PATH variable is properly defined?(2)

    Are you sure your NDK_MODULE_PATH variable is properly defined? STEP1:   MIND: 明确NDK_MODULE_PATH概念ht ...

  8. EntityFramework:迁移工具入门

    背景 刚毕业做项目的时候,没有用“迁移”这个概念,系统发布和更新的过程让人非常痛苦,在学习 Ruby On Rails 的过程解除了“迁移”,以后的所有项目都会先确定好“迁移”的方案,本文介绍一下En ...

  9. java解析json数组

      java解析json数组 import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; ...

  10. easyui radio 取值和赋值

    1.html文件 <td><input id="client" type="text" name="client" sty ...