logo资料库

Qt5 C++ GUI Programming Cookbook pdf 0分.pdf

第1页 / 共301页
第2页 / 共301页
第3页 / 共301页
第4页 / 共301页
第5页 / 共301页
第6页 / 共301页
第7页 / 共301页
第8页 / 共301页
资料共301页,剩余部分请下载后查看
Cover
Copyright
About the Author
Table of Contents
Preface
1: Look and Feel Customization
Introduction
Use style sheets with Qt Designer
Basic style sheet customization
Creating a login screen using style sheets
Using resources in style sheets
Customizing properties and sub-controls
Styling in QML
Exposing QML object pointer to C++
2: States and Animations
Introduction
Property animation in Qt
Using easing curves to control property animation
Creating an animation group
Creating a nested animation group
State machines in Qt
States, transitions, and animations in QML
Animating widget properties using animators
Sprite animation
3: QPainter and 2D Graphics
Introduction
Drawing basic shapes on screen
Exporting shapes to SVG files
Coordinate transformation
Displaying images on screen
Applying image effects to graphics
Creating a basic paint program
2D canvas in QML
4: OpenGL Implementation
Introduction
Setting up OpenGL in Qt
Hello world!
Rendering 2D shapes
Render 3D shapes
Texturing in OpenGL
Lighting and texture filter in OpenGL
Moving an object using keyboard controls
3D canvas in QML
5: Building a Touch Screen Application with Qt5
Introduction
Setting up Qt for mobile applications
Designing a basic user interface with QML
Touch events
Animation in QML
Displaying information using Model View
Integrating QML and C++
6: XML Parsing Made Easy
Introduction
Processing XML data using stream reader
Writing XML data using Stream Writer
Processing XML data using the QDomDocument class
Writing XML data using the QDomDocument class
Using Google's Geocoding API
7: Conversion Library
Introduction
Data conversion
Image conversion
Video conversion
Currency conversion
8: Accessing Databases
Introduction
Connecting to a database
Writing basic SQL queries
Creating a login screen with Qt
Displaying information from a database on a model view
Advanced SQL queries
9: Developing a Web Application using Qt Web Engine
Introduction
Introduction to Qt WebEngine
WebView and web settings
Embedding Google Maps in your project
Calling C++ functions from JavaScript
Calling JavaScript functions from C++
Index
Qt5 C++ GUI Programming Cookbook Use Qt5 to design and build a graphical user interface that is functional, appealing, and user-friendly for your software application Lee Zhi Eng BIRMINGHAM - MUMBAI
Qt5 C++ GUI Programming Cookbook Copyright © 2016 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. First published: July 2016 Production reference: 1220716 Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK. ISBN 978-1-78328-027-8 www.packtpub.com
Credits Author Lee Zhi Eng Reviewer Symeon Huang Commissioning Editor Kartikey Pandey Acquisition Editor Indrajit Das Copy Editor Safis Editing Project Coordinator Izzat Contractor Proofreader Safis Editing Indexer Rekha Nair Content Development Editor Production Coordinator Priyanka Mehta Aparna Bhagat Technical Editors Dhiraj Chandanshive Ravikiran Pise Cover Work Aparna Bhagat
About the Author Lee Zhi Eng is a 3D artist-turned-programmer who worked in the video game industry as a game artist, game programmer, and a game programming lecturer. Later, he decided to take a break from games and ventured into software engineering by co-founding his current company, Reonyx Tech. Since then, he has been involved in multiple projects that are different from what he used to do, including geolocation and near-real-time navigation systems, Big Data analytics, and augmented reality. You can find out more about him at http://www. zhieng.com, or you can find out about his company at http://www.reonyx.com.
About the Reviewer Symeon Huang is an experienced C++ GUI software developer and the author of Qt 5 Blueprints, Packt Publishing. He has finished his master's degree in high performance computing and has been working as a software engineer in industry. I'd like to thank Packt Publishing for giving me the opportunity to review this book. As a reviewer, I've also learnt from this book and I'm sure this book will be of great use to all readers.
www.PacktPub.com eBooks, discount offers, and more Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at customercare@packtpub.com for more details. At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks. TM https://www2.packtpub.com/books/subscription/packtlib Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can search, access, and read Packt's entire library of books. Why Subscribe? f Fully searchable across every book published by Packt f Copy and paste, print, and bookmark content f On demand and accessible via a web browser
Table of Contents Preface Chapter 1: Look and Feel Customization Introduction Use style sheets with Qt Designer Basic style sheet customization Creating a login screen using style sheets Using resources in style sheets Customizing properties and sub-controls Styling in QML Exposing QML object pointer to C++ Chapter 2: States and Animations Introduction Property animation in Qt Using easing curves to control property animation Creating an animation group Creating a nested animation group State machines in Qt States, transitions, and animations in QML Animating widget properties using animators Sprite animation Chapter 3: QPainter and 2D Graphics Introduction Drawing basic shapes on screen Exporting shapes to SVG files Coordinate transformation Displaying images on screen v 1 1 2 6 11 19 23 27 36 39 39 39 42 44 47 50 53 57 59 65 65 66 69 75 80 i
分享到:
收藏