C/C++ -- Gui编程 -- Qt库的使用 -- Qt5总结

主要变化:

1.与Qt4相比,Qt5可以直接显示中文不需要手工转码
2.Qt5模块发生变化,大部分组件并入widgets模块

注意事项:
工程文件加一句greaterThan(QT_MAJOR_VERSION, 4) QT += widget

使用建议:
1.Qt5的工程文件先加一句greaterThan(QT_MAJOR_VERSION, 4) QT += widget或者QT += widgets。
2.Qt5使用头文件的时候<QApplication>和<QtWidgets/QApplication>带不带抬头都行
3.Qt5的头文件<QtWidgets>大致相当于Qt4的<QtGui>
4.为了提高Qt5对Qt4的兼容性
工程文件使用greaterThan(QT_MAJOR_VERSION, 4) QT += widget
头文件使用时不要带抬头“QtWidgets/”

转载于:https://www.cnblogs.com/baijifeilong/p/3711715.html

Create visually appealing and feature-rich applications by using Qt 5 and the C++ language Qt 5, the latest version of Qt, enables you to develop applications with complex user interfaces for multiple targets. It provides you with faster and smarter ways to create modern UIs and applications for multiple platforms. This book will teach you to design and build graphical user interfaces that are functional, appealing, and user-friendly. In the initial part of the book, you will learn what Qt 5 is and what you can do with it. You will explore the Qt Designer, discover the different types of widgets generally used in Qt 5, and then connect your application to the database to perform dynamic operations. Next, you will be introduced to Qt 5 chart which allows you to easily render different types of graphs and charts and incorporate List View Widgets in your application. You will also work with various Qt modules, like QtLocation, QtWebEngine, and the networking module through the course of the book. Finally, we will focus on cross-platform development with QT 5 that enables you to code once and run it everywhere, including mobile platforms. By the end of this book, you will have successfully learned about high-end GUI applications and will be capable of building many more powerful, cross-platform applications. What You Will Learn Implement tools provided by Qt 5 to design a beautiful GUI Understand different types of graphs and charts supported by Qt 5 Create a web browser using the Qt 5 WebEngine module and web view widget Connect to the MySQL database and display data obtained from it onto the Qt 5 GUI Incorporate the Qt 5 multimedia and networking module in your application Develop Google Map-like applications using Qt 5’s location module Discover cross-platform development by exporting the Qt 5 application to different platforms Uncover the secrets behind debugging Qt 5 and C++ applications
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值