Application Development with Qt Creator - Second Edition by Ray Rischpater
Author:Ray Rischpater [Rischpater, Ray]
Language: eng
Format: azw3
Publisher: Packt Publishing
Published: 2014-11-27T05:00:00+00:00
As Qt's painting implementation uses the underlying windowing system, any application that performs graphics operation must be built using QGuiApplication, which initializes the windowing system as part of its startup.
Drawing with QPainter on QPaintDevice instances
At its core, graphics painting requires two things: something that knows how to paint and something that can be painted on. Qt defines the QPainter class as the former and the QPaintDevice as the interface for classes for the latter. You'll seldom instantiate each, but you use both of these classes a lot if you're doing graphics programming; typically, you'll have an instance of a subclass of QPaintDevice, ask it for its associated QPainter, and then use QPainter to perform your drawing. This can happen when you're writing a widget; you'll be passed a QPainter subclass, for example, when you need to paint the widget's contents.
There are several subclasses of QPaintDevice:
QWidget: This class and its subclasses are used by the widget hierarchy
QImage: This is a container class for offscreen images that are optimized for input/output and individual pixel access
QPixmap: This is a container class for offscreen images that's highly optimized for interaction with the screen
QBitmap: This is a subclass of QPixmap that has a bit depth of 1, making it suitable for monochrome images
QPicture: This is a paint device that records QPainter drawing operations and can play them back
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Hello! Python by Anthony Briggs(9916)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(9796)
The Mikado Method by Ola Ellnestam Daniel Brolund(9779)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8298)
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(7779)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7763)
Grails in Action by Glen Smith Peter Ledbrook(7696)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7557)
Windows APT Warfare by Sheng-Hao Ma(6847)
Layered Design for Ruby on Rails Applications by Vladimir Dementyev(6580)
Blueprints Visual Scripting for Unreal Engine 5 - Third Edition by Marcos Romero & Brenden Sewell(6450)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6414)
Kotlin in Action by Dmitry Jemerov(5064)
Hands-On Full-Stack Web Development with GraphQL and React by Sebastian Grebe(4317)
Functional Programming in JavaScript by Mantyla Dan(4038)
Solidity Programming Essentials by Ritesh Modi(4008)
WordPress Plugin Development Cookbook by Yannick Lefebvre(3800)
Unity 3D Game Development by Anthony Davis & Travis Baptiste & Russell Craig & Ryan Stunkel(3744)
The Ultimate iOS Interview Playbook by Avi Tsadok(3717)
