
Welcome to Qt 6 C++ GUI development for beginners. Learn to write code once and recompile for Windows, Mac, Linux, Android, and iOS using Qt Widgets and Qt Quick.
Explore building Qt 6 C++ GUI apps from console to graphical interfaces, learning signals and slots, widgets, main windows, dialogs, file operations, style sheets, settings, and model-view design.
Set up a Windows environment for Qt 6 C++ GUI development by installing the Qt online installer and 64-bit binaries, then build cmake or qmake projects in Qt Creator.
Set up Ubuntu by installing Qt Creator dependencies, download the 64-bit Qt online installer, and compare QMake and CMake, noting CMake (Simec) is the future for Qt projects.
Explore the Qt 6 C++ GUI workflow by building a sample form in Qt Creator, arranging labels and inputs, and printing submissions via the debug output.
Explore building console applications and translating them into graphical user interface apps with C++ in the Qt framework, gain basics, and preview a calculator project.
Explore the Qt Creator user interface, navigate menus, and use the welcome, edit, and help tabs. Learn to switch kits, run and debug apps, and access comprehensive documentation.
Create plain C++ console applications in a non-Qt project using CMake. Configure run in terminal, view hello world, and note C++11/17 support versus limited C++20.
Create a console application using the cute framework in cute creator, set up a project, link libraries, and print hello world with the queue debug class while exploring the documentation.
Explore standard c++ streams for console output and input, including cout, cerr, and cin, with examples in a Qt Creator console project.
Explore C++ data types, from built-in types like int, string and bool to float and double, and learn how memory size and modifiers such as short and unsigned affect storage.
Explore C++ flow control and operators, learn to use if statements, and master for, while, and do-while loops for repeating tasks in console applications.
Develop a Qt 6 C++ program that seeds time-based randomness, generates a 1–10 number, and guides guesses with higher or lower feedback until success, then congratulates the player.
Learn how to declare and use functions in C++, specify return types and parameters, return values, and overload functions for different types like int, float, and double.
Declare and instantiate a C++ rectangle class with private width and height, using public setters and a get area method; explore prototypes and the scope resolution operator.
Master class constructors in C++, learn how to initialize data with default and parameterized constructors, initializer lists, and scope resolution, using rectangle and box examples for area and volume.
Split the code by moving the rectangle and box into separate header and source files, update CMake to include them, and keep the main file clean with header includes.
Understand how a C++ program moves from source to binary by mastering the build process—pre-processing, compilation, and linking—and learn how declarations and definitions, headers, and prototypes shape functionality.
Build a simple Qt 6 C++ GUI by creating a widget-based application, adding a button, and showing a popup message via a QMessageBox information call.
Build a Qt 6 GUI number guessing game with a spin box, guess button, and start over button. Generate a secret number and give higher or lower hints.
Learn how to transform a console application into a graphical user interface with Qt 6 C++, reinforcing essential C++ basics for beginners and easing transitions from other languages.
Explore memory management tools in the Q2 framework and C++, and compare the new and delete operators, smart pointers, and the parent-child relationship to manage memory effectively in modern C++.
Explore heap and stack memory in c++ showing stack allocation for local objects and heap allocation with new, and emphasize releasing with delete or smart pointers to prevent memory leaks.
Explore how smart pointers in C++ automate heap memory management, using unique_ptr and shared_ptr (and weak_ptr) to ensure memory is released when out of scope, even in exceptions.
Explore the acute parent-child relationship in Qt to automatically release memory for child objects when a parent dies, using heap allocation, smart pointers, and QObject-based hierarchies.
Master memory management in C++ by using the delete operator and smart pointers, including unique_ptr, shared_ptr, and weak_ptr, while noting parent-child relationships and destructors.
Explore how signals and slots connect events in Qt 6 C++ GUI development, linking a button to a function and executing code on click, with lambdas and practical demos.
Master lambda syntax in C++11, including capture lists, parameter lists, and return values; learn immediate and stored invocation, with by-value and by-reference captures.
Explore how signals and slots enable simple, intuitive communication between objects in the acuity framework, with examples like a button changing a label or a slider updating a progress bar.
Connect a slider to a progress bar using Qt signals and slots, exploring function notation and lambda functions in a Qt Creator user interface with horizontal slider and progress bar.
Build a calorie counter app in Qt 6 C++ that uses a level-surface formula to compute calories from weight, time, speed, and slope.
Explore Qt6 property bindings with Acuity framework for C++ Qt widgets. The lecturer notes limited support and redirects to the Qt blog for examples, contrasting bindings with signals and slots.
Master signals and slots in the Qt framework, wiring a button to code execution via string, function, or lambda notation; demos connect slider to a progress bar and calorie counter.
Explore the fundamentals of Qt 6 C++ GUI development by learning GUI components, layouts, line edits, and text effects, and master resize-friendly design with the Human Window class and menus.
Create a custom Qt 6 widget entirely in code by deriving from QWidget, adding labels and a button, with signals and slots, palette and font styling, and a size hint.
Develop a Qt 6 main window from scratch by subclassing QMainWindow, setting a central widget, and wiring menus, toolbars, status bar, and actions with signals and slots.
Learn to use the QMessageBox class in Qt 6 to display information, questions, or warnings, and handle user choices with return values or static methods.
Learn to use the Qt 6 push button class with pressed, released, and clicked signals, build a two-button widget, and display debug messages in the console.
Master QLineEdit usage in a Qt 6 C++ widget app by creating first name, last name, and city fields, validating input, and handling signals to output data to the console.
Build and configure a QTextEdit text editor in Qt 6, connect signals like textChanged, and perform copy, cut, paste, undo, redo, and plain text or HTML manipulations.
An introduction to using the QLabel component to display text or images in Qt 6 C++ GUI apps, including designer forms, UI files, and the resource system for pixmaps.
Create a QHBoxLayout, add buttons, and set it on a widget to organize controls horizontally. Learn that the widget takes over memory management of the layout, ensuring cleanup.
Explore the QVBoxLayout class to arrange buttons vertically and apply the layout to a widget, with or without a parent, in code or via the form in Qt Creator.
Master size policies and stretches in Qt 6 to control how widgets resize with their containers. Learn horizontal and vertical policies, including expanding, fixed, and preferred, with practical examples.
Explore the QGridLayout class to arrange buttons in a grid using coordinates, with row and column spans, and learn how memory management and size policies affect layout.
Explore how to set up radio buttons and checkboxes in Qt 6 C++ GUI development, create exclusive and non-exclusive groups, handle toggled signals, and grab or set data programmatically.
Learn how QList, a Qt container class, stores strings and events, and how to append, access by index, loop through, and print elements in a console application.
Explore QListWidget for displaying and managing items in a Qt widget; add, delete, and select items, set multi or single selection, and access selected items and their text and index.
Explore the QTabWidget class, create multiple tabs with widgets and layouts, and learn to insert tabs, set tab titles, and respond to button clicks in a Qt Creator project.
Explore how to implement a Qt 6 QComboBox to present options, add items, read and set the current value and index, and enable editing via code or the UI form.
Learn to build a Qt 6 C++ GUI with menus, toolbars, and actions in a widgets-based main window, including text editing, icons, resource management, and basic event handling.
Learn to use the acuity framework's widgets, including queue, push button, line edit, text, list, and combo boxes, with layouts and the Human Window for menus, toolbars, and status bars.
Explore the dialog features in Qt 6, including the QDialog class and the QDialogButtonBox, and learn to show file dialogs and font dialogs with yes-no confirmations for risky actions.
Create custom dialogs in Qt 6 C++ by subclassing QDialog, designing a form, and handling OK/cancel to capture user input, with modal and non-modal options.
Learn to use QDialogButtonBox in Qt 6 C++ to layout dialog buttons in platform-conformant ways, with vertical or horizontal modes and standard buttons like ok and cancel.
Learn how to use the QFileDialog class in Qt 6 to let users browse files or directories and handle returned strings with methods like getOpenFileName and getExistingDirectory.
Explore the QFontDialog in Qt 6 to let users pick fonts, sizes, and styles, returning a font that you apply to a label when a valid selection is made.
Learn to use QColorDialog to pick colors in a Qt 6 C++ GUI, applying chosen text and background colors via QPalette to a label, and leverage QFontDialog for fonts.
Explore how to use QInputDialog to prompt users for text, numbers, or items, including get text, get double, and get item options with range, default value, and decimals.
Explore how to display temporary information to users with QDialog in Qt, using modal dialogs and the show method, and consult the queue dialog documentation.
Learn how the Qt resource system packages files into the application binary using a .qrc file. Discover prefixes and aliases to organize resources and how projects reference them.
Explore creating a Qt resource file to wrap images, organize them with root, edit, and help prefixes, and use resource system to populate menus and toolbars on a main window.
Bundle resources into the binary with the Qt resource system. Create a .rc resource file with a resource editor to add images from the images folder.
Explore how to style Qt applications with QStyle and style sheets, controlling colors, borders, fonts, and the look across Windows, Mac, and Linux.
Master qpalette to control widget appearance across active and disabled states by adjusting color groups for text and background in a Qt Creator project.
Learn to style Qt 6 apps with inline style sheets, applying colors and fonts at the application, container, or widget level, and using setStyleSheet at runtime for buttons and dialogs.
Learn to use an external Qt stylesheet by creating a style file, wrapping it in a resource, and using selectors to target buttons by text or object name.
Style line edits, borders, padding, and a yellow background with Qt 6 stylesheets; target widgets by object name to bold labels and add rounded corners.
Explore Qt styling with the QStyle class to control your app’s look. Apply style sheets at the app or widget level for consistent visuals beyond palette quirks and OS differences.
Learn how to use QSettings to persist application state across sessions and platforms by saving and loading settings in groups, with keys, default values, and type-safe reads via QVariant.
Learn how to build a Qt 6 C++ widget app that saves and loads button colors using QSettings, storing red, green, blue components by key and applying them as styles.
Explore the acute settings class in Qt 6 C++ GUI development to save and read cross-platform settings using a settings object, begin group, save value, and read value with defaults.
Welcome to Qt 6 C++ GUI Development for Beginners.
Qt is a cross platform application development framework. It can be used to build Graphical User interfaces that can run on Windows, Mac Linux , mobile platforms like android and ios, even embedded devices.
This course will focus on using Qt Widgets to build robust cross platform desktop applications capable of running well on major desktop Operating Systems like Windows , Mac and Linux.
While Qt Widgets can technically run both on mobile and embedded, it's better and less painful to use QML, another technology provided by the Qt framework. If you want to target mobile and embedded, then please check our courses on QML and Qt Quick. This course doesn't QML , Mobile or embedded!
The course assumes no prior knowledge of Graphical User Interface Development and even provides a C++ refresher crash course for those in need of a helping hand to get up and running with C++ within the Qt environment. By the time you are done with the course, you'll not only be armed with knowledge you could use to build basic to intermediate Graphical user interfaces, but you will also have enough momentum to use the documentation to even learn more on your own. As with my other courses, I use every chance I get to show you how to use the documentation to find solutions on your own and faster.
Let's take a look at the content of the course.
We start with a complete beginner to both C++ and Qt in mind, and we take you through the the process of getting your environment set up on your platform of choice :
We do a live install of Qt Creator on Windows
We do a live install of Qt Creator on Linux
We guide you though how you would install Qt Creator on a Mac
We then take you on a tour of the C++ programming language, covering the concepts deemed important to start working with Qt to build your shinny GUI applications. You don't need to be a C++ wizard to start writing your applications using Qt. One of the goals behind Qt itself is to be as easy to use as possible, helping you to focus on your application logic rather than the C++ complex plumbing. This does not mean that you can do with zero C++ knowledge though. That's why we take you on a tour to cover the basic concepts of the language covering topics like:
Running your first console application and understanding the main function
Streams that help you write and read data from your C++ applications
Variables and Data Types
Basic C++ Operators and Control flow where among other things you learn about if clauses and loops
Build an app to guess numbers and put together the concepts learned so far
C++ Functions
C++ classes
Building your first Qt C++ GUI Application
Building a GUI Version of your Number guessing game
We then visit the fascinating concept signals and slots in Qt where you learn the most flexible way to respond to events :
We'll explore lambda functions in C++ in general, we'll need them to use their SIGNAL SLOT syntax
We explore different ways to connect signals to slots in Qt
We then do a concept enforcing demo for you to try them out
Next we dive in the Qt Widgets section and visit some of the most important widget classes in Qt :
QWidget
QMainWindow
QMessageBox
QPushButton
QLineEdit
QTextEdit
QLabel
QHBoxLayout, QVBoxLayout, QGridLayout
We visit size policies and stretches and how they help tie the knots in your layouts
QCheckBox and QRadioButton
QList
QComboBox
QListWidget
QTabWidget
QMenu, QToolBar, QAction
Dialogs are explored next , we look at QDialog and how to build your own custom dialog class from scratch , QDialogButtonBox, QMessageBox, QFontDialog, QFileDialog, QInputDialog and how they add a layer of interactivity to your Qt GUI applications.
We then go on and explore how to work with the Qt Resource System , Styling your Qt applications with QStyle, QPalette and Style Sheets, Saving your application settings with QSetting, Working with Files and Directories using QFile and QDir, working with the network capabilities of Qt where we :
See the different classes that are available to work with networks in Qt
Build an application to download web pages in our Qt Applications
Build an application to consume Rest APIs in your Qt Applications
and we wrap up the course looking at the Model View Architecture of the Qt framework where we learn about classes like
QListWidget
QTableWidget
QTreeWidget
QListView
QTableView
QTreeView
QStandardItemModel
QAbstractItemTableModel
QAbstractItemListModel
QStringListModel
and much more!
Qt has quite a huge user base and there are thousands of projects using both open source and commercial, including the one I am using to record this video right now. If you want to build cross platform graphical user interface applications using C++, this course is designed with the skill, patience and depth, needed to get you there as effisciently as possible. Please check out some of the preview videos and let's get you started building cross platform GUI applications using C++ and Qt 6.