Primary Reference: Getting Started with Qt 5 by Benjamin Baka
Author: Mahbod BemaniCham (@Mahbodbe)
This repository documents my personal journey and hands-on practice in learning Qt C++ GUI Framework and Qt Creator.
It contains code samples, structured exercises, and projects derived from:
- Primary Reference Book: Getting Started with Qt 5 written by Benjamin Baka.
- AI-Guided Exercises: Custom exercises generated by AI assistants to practice specific framework concepts.
- chapters/: Hands-on exercises structured by topic:
- 01-introduction/: Standard boilerplate wizard-generated windows
- 02-hello-world/: Basic window layout and label hover stylesheets
- 03-basic-widgets/: QPushButton, QLabel, layouts, grid/form designs
- 04-signals-slots/: Core Qt event linking, slider-dial synchronizations
- 05-mainwindow-resources/: Actions, menus, custom toolbars, active rich text notepad
- 06-events-drag-drop/: Overriding keyboard/mouse events, drag and drop handlers
- 07-database-sql/: QODBC MySQL connections, table models, QTableView display
- showcase-projects/: Main applications:
- record-management-system/: Spreadsheet-like GUI Record Management System with MySQL sync
- docs/: Architecture notes and implementation logs
- .gitignore: Qt Creator, QMake/CMake, & MSVC build artifact ignores
- README.md: Project documentation (English Version)
- README_FA.md: Project documentation (Persian Version)
- Introduction to Qt Creator Wizards: Boilerplate template setup for simple desktop window applications.
- Basic GUI Setup: Launching simple QLabel windows.
- Style Sheets: Modifying look and feel inline and with style states.
- 01-button-tooltip: Setting QPushButton tooltips and custom icon loading.
- 02-label-alignment: Text alignments and setting up Comic Sans typography.
- 03-form-grid-layouts: Comparison and application of Form () and Grid () managers.
- 04-login-vbox-layout: Designing standard login forms using Vertical layouts ().
- 05-url-exporter-hbox: Designing Horizontal alignments ().
- 01-quit-connection: Linking a button press to slot.
- 02-dial-label-link: Real-time data feed connection between and a string-based label.
- 03-dial-lcd-label: Advanced real-time multi-connection mapping one source trigger to multiple receiving widget slots.
- 04-slider-dial-sync: Two-way connection loops synchronizing linear sliders with dials.
- Progressive text editor/word processor application:
- 01-menubar-actions: Registering action lists into File and Edit menus.
- 02-toolbar-status: Custom active toolbar with PNG icons and a status bar.
- 03-open-file-slot: Hooking up QFileDialog to open and read system files.
- 04-save-file-slot: Writing modified files back to system using stream buffers.
- 05-text-edit-editor: Fully functional combined rich text canvas editor.
- 06-word-processor-full: Complete feature-rich Notepad application.
- 01-mouse-events: Overriding and to intercept actions.
- 02-key-events: Capturing physical keyboard inputs and printing custom log messages.
- 03-text-drag-drop: Subclassing into a custom class to intercept text drags.
- 04-file-drag-drop: Overriding standard main window drag/drop rules to import files directly.
- 01-connection-odbc: Establishing a connection to a MySQL server via .
- 02-select-query: Executing SQL queries and parsing row elements.
- 03-bind-insert: Secure parametric SQL values insertion (positional and named binds).
- 04-sql-crud: Full cycle SQL transaction testing (INSERT, UPDATE, DELETE).
- 05-sql-table-model: Utilizing and its submit strategies.
- 06-sql-table-view: Visualizing and live-modifying database tables on screen using .
A standalone desktop suite located under demonstrating full framework synergy:
- Rich Spreadsheet UI: Visualizing lists with sorting and searching.
- JSON & CSV Storage: Importing and exporting local database files.
- MySQL Integration: Writing and syncing large tables safely using database transactions.
- Unsaved Changes Interceptor: Dialog prompts checking state before exiting or creating new files.
- Qt Framework (Qt 5.12+ / Qt 6.x)
- Qt Creator IDE (or MSVC with Qt extension)
- C++ Compiler (GCC, Clang, or MSVC)
- ODBC Driver (for MySQL Database chapters)
- Open Qt Creator.
- Select .
- Open any project file (e.g. ).
- Click Configure Project and press to compile and launch.
Placeholder: Capture the main application window displaying the loaded table records and operational buttons.
Placeholder: Capture the Word Processor application with active toolbar, custom icons, and file actions.
- Mahbod BemaniCham — @Mahbodbe