Learn Robust Qt & C++ Gui Programming: 2D Graphics Tutorial
4.1 (49 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
447 students enrolled
Wishlisted Wishlist

Please confirm that you want to add Learn Robust Qt & C++ Gui Programming: 2D Graphics Tutorial to your Wishlist.

Add to Wishlist

Learn Robust Qt & C++ Gui Programming: 2D Graphics Tutorial

Become a confident Qt GUI and C++ software developer with step by step programming tutorials and 2D graphics examples
Bestselling
4.1 (49 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
447 students enrolled
Created by Dan Munteanu
Last updated 8/2017
English
Current price: $10 Original price: $75 Discount: 87% off
5 hours left at this price!
30-Day Money-Back Guarantee
Includes:
  • 2.5 hours on-demand video
  • 8 Articles
  • 3 Supplemental Resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
What Will I Learn?
  • Create robust, well designed C++ apps with Qt, in a bottom-up approach
  • Use Qt toolkit's out-of-the-box functionality to rapidly build Windows apps
  • Develop a C++ program from scratch
  • Drag and drop UI elements to design the application GUI (user interface)
  • Draw very interesting and quite unusual 2D geometrical shapes ☆
  • Write scalable source code that adapts to any new shape type added to the program
  • Use source versioning with Git and SourceTree to commit code changes to online repositories
  • Use the Qt signal and slots mechanism to handle user interface events
View Curriculum
Requirements
  • (Required) Working knowledge of C++ syntax and language fundamentals
  • (Required) Know the basics of OOP (Object Oriented Programming) with C++
  • (Preferable) Understand simple mathematical expressions and functions (sine, cosine, exponential)
  • Feel comfortable using open source technologies
  • Have a good understanding of creating your own C++ source files and header files
Description

This course will help you upgrade your C++ software development skills today!

You will learn application development with Qt and C++, from the ground up. 

(make sure to check the DEMO lecture to see the final app)

C++ is a very powerful and versatile programming language.

Qt is multi-platform framework, the perfect choice for open source GUI development with C++.

In this course, you will design and create your own C++ program for the Windows platform.

You will add new features to the app, step by step.

You will learn how to write good source code, at professional-level.

You can learn programming in C++ from anyone you wish to, there are many teachers and a lot of free know-how out there.

But if you want to learn to code like a professional, here's my advice to you:

  • Choose to learn from someone who has already done professional level coding
  • Choose a teacher who has a proven track record working experience with C++ and Qt
  • Choose a mentor who has done this for years, and knows what it takes to create industry-level software

If you don't, you will be wasting your time with outdated and misguided knowledge.

And eventually you will lose many opportunities, even employment opportunities.

Now here's how the course is structured. Each lecture prepares the groundwork for the next one. You will:

  • write code in C++ (03)
  • use Qt toolkit's UI elements to create the GUI (Graphical User Interface)
  • set up the main application window
  • drag and drop user interface elements (buttons, widgets, labels, spinners...) on the main window
  • connect UI elements to UI events (mouse clicks, value changed)
  • write custom event handling code that updates the painted graphic

You need to have a good understanding of OOP (Object Oriented Programming) fundamentals, as you will be adding and working with:

  • class member variables
  • class member functions
  • setters / getters
  • private / public / protected access modifiers
  • encapsulation to protect the data
  • constructors and destructors
  • overriding virtual base class functions
  • pointers to objects

You will be organizing the program logic into C++ specific header (.h) and implementation (.cpp) source files.

You will design the GUI (Graphical User Interface) with QtCreator (part of the Qt toolkit) and make use of the signal and slots mechanism to make your buttons and other UI elements respond to mouse click or value changed events.

You will setup your custom rendering area widget that integrates flawlessly with the Qt5 framework, by inheriting from the QWidget base class and overriding abstract class methods.

You wil learn how to fix the compiler errors that can occur during development.

You will also learn how to fix linker errors caused by missing function implementations.

You will use a bottom-up approach to develop robust software.

Notice the key word here - robust.

That means professional-level C++ code.

Your programs will be designed with reusability in mind. And will be written with future upgrade capabilities in mind.

You will also use Math and Geometry in an unexpected way, to create some unusual 2D graphics shapes.

You will also get some hands-on experience by taking the course assignments.

The assignments are designed to get you comfortable with the code and teach you to extend the application on your own, after you have completed the course.

Should I go on or do you want to start learning now?

This course is the culmination of my 10 years of learning software development and working in the IT industry.

Ok, here are a few more things you will get from it:

  • How to create an online repository with BitBucket
  • How to use source versioning (GIT) to save intermediary code changes and revert back to them anytime if you make a mistake
  • Tips and tricks for good coding practices

So come on, let's start creating 2D graphics with Qt5 And C++ Gui Programming!


Who is the target audience?
  • NOT for begginers!
  • You want to learn C++ GUI programming with Qt GUI
  • You are an intermediate developer or programming enthusiast
  • You want to learn how to design and create software from scratch
  • You love software development (especially with C++)
  • You want hands-on coding experience
  • 2D graphics amateur or passionate
Students Who Viewed This Course Also Viewed
Curriculum For This Course
38 Lectures
02:41:22
+
Setup Your Development Environment
6 Lectures 15:18

This lecture gives you an overall presentation of this course and answers the following questions:

  • What is this course about?
  • Who is your instructor and his background?
  • Is this course for you?
  • What do you need to know before you take this course?
Preview 04:02

Demo of the application you will build step by step in Section 1 of this course.

Preview 00:59

This course requires installing the Qt framework. This lecture is a step by step guide on how to download and set up Qt SDK as a pre-requisite for creating the first project.

Preview 03:26

GIT is a fast version control system. You will use it to store your intermediary code changes. It consists of a set of command line tools that help you keep a ledger of all the important changes of your project. This lecture is a step by step install guide for GIT.

Installing Git (The Version Control System)
03:29

You will install SourceTree, an application that integrates with GIT and allows you to version control your source code by using a graphical user interface. Think of it as a user interface layer on top of the GIT commands. (check External Resources for download link and a Git GUI alternative)

Installing Source Tree
01:11

BitBucket is an online service that allows you to create unlimited repositories, both private and public, to store your source code and intermediary changes online. In this lecture you will create your free account.

Creating a BitBucket account
02:11
+
Drawing Shapes
16 Lectures 01:46:49

This lecture is about doing the project groundwork:

  • preparing a local folder to hold the project files
  • creating the Qt Widgets application with Qt Creator
  • overview of the boilerplate code generated on project creation
  • ui cleanup, first build and run

Includes the QtCreator cheatsheet - useful shortcuts used during this course.

Preview 10:59

We will create our first commit using GIT. Then, we will create a BitBucket online repository to hold our newly created project files. Then we will use SourceTree to push the initial commit to our online repository. The first commit is a bit different from the rest, but these steps need to be done only once.

First Commit
04:06

A list of handy QtCreator shortcuts to make your life easier. 

QtCreator shortcuts (GUIDE)
00:03

This lecture is about creating and setting up a custom painting area.

  • adding a new RenderArea class
  • promoting a QWidget to RenderArea
  • overriding QWidget's base class functions 
  • painting the background blue to make sure it all works


Preparing The Render Area
08:22

This lecture is about making the application "aware" of the shapes we're going to draw:

  • adding support for different shape types
  • adding buttons to the user interface for each shape
  • adding click handlers for button presses 
  • adding getter and setter functions for the background color
  • painting the background a different color on each button press
Adding Shape Types And Background Colors
08:51

The application must know which is the active shape:

  • adding active shape getter / setter functions
  • refactoring shape type names
  • writing a switch statement in the paint event
Setting The Active Shape
07:07

This lecture is about drawing our first shape! It's called The Astroid and it looks like a 4-pointed curvy star.

  • short explaination for the maths behind the shape (easy!)
  • implemeting the initial generic shape drawing algorithm (dots only for now)
  • adding a function to compute the astroid equation
  • scaling and translating the astroid to the center of the render area
Preview 09:51

This lecture is an initial preparation step to making the app handle all shape types dynamically:

  • promoting local scope variables to class member status
  • updating the custom paint event to use class member variables
  • adding a class function to update shape control variables based on the active shape type 
On Shape Changed
05:56

This lecture is another preparation step for dynamic shape painting (last one, I promise)

We're adding a dispatcher function that will route the shape computing algorithm to the proper parametric functions, depending on the active shape type.

Compute Dispatcher
06:32

Pop Quiz
4 questions

Finally! With everything in place, we're now implementing every compute function and painting all the remaining shapes.

  • updating shape control values for Astroid, Cycloid, Hypo Cycloid and Huygens' Cycloid
Drawing The Cycloid Shapes
06:00

To prove that the framework we've developed is dynamic, we're going to use it and draw a simple 50 pixels wide line, using parametric equations.

Drawing A Parametric Line (Just For Fun)
06:43

The shapes don't look so good when we're using only points to draw them.

Let's connect the dots and give the shapes a face-lift.

We're going to update the painting algorithm once and all shapes will be updated.

Preview 04:09

We're adding a spinner component to the main window to update the scale argument for the Astroid at run-time.

Shape Control #1: Scaling The Astroid
07:39

We're adding a new function to the render area class. It will be called every time one of the 3 shape control values is updated.

Shape Control #2: Adding the update_ui() method
04:36

We're adding the last shape control spinner that will update the number of approximation points (stepCount). Also commiting the changes from the last 3 lectures.

Shape Control #3: Counting Your Steps
05:35

This lecture is about changing the background color and the active shape color. We're: 

  • adding one button for each color to change
  • using a predefined Qt color picker from code
  • plugging in the selected color into the painting algorithm
Adding A Drop Of Color
10:20
+
Assignments
10 Lectures 23:51

ASSIGNMENT: You will have to modify the control variables for some of the shapes. This will get you hands-on experience with the codebase.

ASSIGNMENT 1: Update control variables
00:25

(Solution) Assignment 1
02:38

ASSIGNMENT: Add a Circle to the application. You are given the values for the control variables and the Circle's parametric equations for the X and Y coordinates.

ASSIGNMENT 2: Going full-circle
00:25

(Solution) Assignment 2
05:44

ASSIGNMENT: Add an Ellipse shape to the application. You are given the values for the control variables and the Ellipse's parametric equations for the X and Y coordinates.

ASSIGNMENT 3: Focusing on the ellipse
00:23

(Solution) Assignment 3
04:39

ASSIGNMENT: Add a Fancy shape to the application. You are given the values for the control variables and the Fancy shapes's parametric equations for the X and Y coordinates.

ASSIGNMENT 4: The fancy curve
00:23

(Solution) Assignment 4
03:26

ASSIGNMENT: Add a Lucky Starfish shape to the application. You are given the values for the control variables and the Lucky Starfish' formula.

ASSIGNMENT 5: A lucky starfish
00:27

(Solution) Assignment 5
05:19
+
Additional Lectures And Resources
6 Lectures 15:30

In this lecture we're fixing a bug in the painting algorithm.

When step count is really low, the shape is not fully drawn, but missing a line. 

Bug Fixing The Paint Logic
01:42

We're making the shapes more visible by using a QPen to set the line width and also the shape color.

The Mighty QPen
03:27

Learn how to draw a cloud-like shape. 

Cloud Shapes #1: The Puffy Cloud
05:09

We're re-using the code from the cloud-like shape to draw an inverted cloud shape.

Cloud Shapes #2: Inverted Cloud
05:00

A quick refresh of some important C++ object oriented notions.

C++ & OOP Good Practices (GUIDE)
00:04

Contains exclusive goodies for my awesome students.

Bonus Lecture: The Goodie Bag
00:07
About the Instructor
Dan Munteanu
4.0 Average rating
92 Reviews
2,239 Students
2 Courses
Online Entrepreneur, Blogger, Software Developer

Hi, I am Dan Munteanu and I am an online entrepreneur.

I started my life's journey with software development. For 10 years, I learned and perfected my software development skills.

For over 7 years, I focused on C++ and Computer Graphics (both 2D and 3D)

I have a degree in Computer Science from a well-known University in Cluj Napoca, Romania.

But in the past years, in my spare time, I learned as much as I could about psychology. And I started applying what I learned in real life. 

I upgraded my dating life and I also helped my friends upgrade their dating life and improve their self esteem. 

My Mission:
I want to help you get the results you seek as soon as possible. 

You see, I have invested thousands of hours into the topics I loved learning. 

Because of this, I have the expertise required to make your learning journey much, much shorter.

That is, if you allow me to become your mentor.

I like to coach people and help them bring out the best in themselves.

I run a personal development blog for the Romanian public and I teach on Udemy since 2016. 

I am constantly improving and upgrading my courses, to meet my students' expectations and help them overcome their challenges.

Fun fact: my youngest student of computer science was only 8 years old! 

My motto is "As long as we're alive, learning never stops"

We should always be renewing and improving our skills and knowledge, to adapt to the ever changing demands of modern day life.

I am eager to help you reach a deep level of understanding of the topics I am an expert in.

Are you ready to start learning?