SlideShare a Scribd company logo
1 of 8
Advanced Qt
•   Qt Creator IDE
•   Signals/Slots mechanism
•   Qt meta-system
•   Parent/child ownership
•   Copy-on-write
•   Bonus
Qt Creator IDE - native IDE for Qt
• free, open-source and cross-platform
• full development cycle out of the box
• QtWidget and QtQuick WYSIWYG design tools
• fast but multifunctional
• VCS integration support
• debugging and profiling
• project management
• Qt help integration
• powerful code editor
• examples and tutorials
• build configuration and
  management
QObject and QWidget

QObject - central class in Qt
• base for most Qt classes
• handles signals/slots
• keeps meta-data
• handles parent/child ownership
 QWidget - base for all UI classes
• handles widgets positioning
• any widget can be a separate window
• handles UI events (mouse, keyboard etc)
• can be simply ported to any platform thanks to Lighthouse
Parent/child ownership

The problem:
• make complex object's lifetime control transparent for
  developer
• prevent memory leaks and referencing deleted objects
• prevent removing button while windows still visible
 The solution:
• each QObject may have a parent QObject
• parent object knows its children and vice-versa
• parent removes its children
• parent widget draws its children inside itself
Copy-on-write
The problem:
• containers copying is usually expensive
• working with pointers is inconvenient
• working with const references decreases readability
 The solution:
• many Qt classes share internal data between object
  copies
• as soon as some object is changed, internal data are
  copied to prevent changing all objects
Signals/slots
• QObjects may emit signals
• QObject's void method may be marked as slots
• Signals and slots may be connected many-to-many.
Benefits:
• simple way of communication between objects
• objects don't know about each other (no interfaces)
• perfectly works in multithreading application
• slot call can be queued for async execution
• connections can be easily managed in run-time
• no configuration needed, just subclass QObject
• works across C++, Javascript, QML
Qt meta-system
•   powered by MOC
•   stores information about QObject memebers
•   provides a way to call object method by name
•   empowers signals/slots mechanism
•   available via QMetaObject, QMetaProperty,
    QMetaMethod, QMetaEnum classes
•   empowers Javascript, QML, plugins
•   make it possible to have WYSIWYG designer
•   highly extensible
Out of scope
•   Model/View architecture in Qt
•   Styling Qt applications
•   Animation in Qt applications
•   Qt Javascript engine
•   Qt plugins system
•   New Qt ports coming: WinRT, Android, iOS
•   Bindings: PyQt, RubyQt, Qt Jambi and more...
•   Mobile programming
•   Declarative programming with QtQuick

More Related Content

Viewers also liked

cpp-2013 #12 Управління пам’яттю Частина 2
cpp-2013 #12 Управління пам’яттю Частина 2cpp-2013 #12 Управління пам’яттю Частина 2
cpp-2013 #12 Управління пам’яттю Частина 2Amazon Web Services
 
cpp-2013 #11 Constness and Exceptions
cpp-2013 #11 Constness and Exceptionscpp-2013 #11 Constness and Exceptions
cpp-2013 #11 Constness and ExceptionsAmazon Web Services
 
High Availability Application Architectures in Amazon VPC (ARC202) | AWS re:I...
High Availability Application Architectures in Amazon VPC (ARC202) | AWS re:I...High Availability Application Architectures in Amazon VPC (ARC202) | AWS re:I...
High Availability Application Architectures in Amazon VPC (ARC202) | AWS re:I...Amazon Web Services
 
Aspect-Oriented Programming (AOP) in .NET
Aspect-Oriented Programming (AOP) in .NETAspect-Oriented Programming (AOP) in .NET
Aspect-Oriented Programming (AOP) in .NETYuriy Guts
 
Export management ppt
Export management pptExport management ppt
Export management pptAMARAYYA
 
Import,export procedure
Import,export procedureImport,export procedure
Import,export procedurerishnrish
 
Export procedure
Export procedureExport procedure
Export procedureJay Parekh
 
EXPORT PROCEDURE & DOCUMENTATION
EXPORT PROCEDURE & DOCUMENTATIONEXPORT PROCEDURE & DOCUMENTATION
EXPORT PROCEDURE & DOCUMENTATIONvikas chauhan
 
Import & export presentation
Import & export presentationImport & export presentation
Import & export presentationEric Lee
 
A PROJECT REPORT ON EXPORT PROCESS AND DOCUMENTATION
A PROJECT REPORT ON EXPORT PROCESS AND DOCUMENTATIONA PROJECT REPORT ON EXPORT PROCESS AND DOCUMENTATION
A PROJECT REPORT ON EXPORT PROCESS AND DOCUMENTATIONSagar Anand
 
EXPORT IMPORT
EXPORT IMPORTEXPORT IMPORT
EXPORT IMPORTRati Kaul
 

Viewers also liked (16)

cpp-2013 #4 Memory management
cpp-2013 #4 Memory managementcpp-2013 #4 Memory management
cpp-2013 #4 Memory management
 
cpp-2013 #12 Управління пам’яттю Частина 2
cpp-2013 #12 Управління пам’яттю Частина 2cpp-2013 #12 Управління пам’яттю Частина 2
cpp-2013 #12 Управління пам’яттю Частина 2
 
cpp-2013 #16 Automated testing
cpp-2013 #16 Automated testingcpp-2013 #16 Automated testing
cpp-2013 #16 Automated testing
 
cpp-2013 #11 Constness and Exceptions
cpp-2013 #11 Constness and Exceptionscpp-2013 #11 Constness and Exceptions
cpp-2013 #11 Constness and Exceptions
 
cpp-2013 #20 Best practices
cpp-2013 #20 Best practicescpp-2013 #20 Best practices
cpp-2013 #20 Best practices
 
cpp-2013 #17 Libraries
cpp-2013 #17 Librariescpp-2013 #17 Libraries
cpp-2013 #17 Libraries
 
High Availability Application Architectures in Amazon VPC (ARC202) | AWS re:I...
High Availability Application Architectures in Amazon VPC (ARC202) | AWS re:I...High Availability Application Architectures in Amazon VPC (ARC202) | AWS re:I...
High Availability Application Architectures in Amazon VPC (ARC202) | AWS re:I...
 
Aspect-Oriented Programming (AOP) in .NET
Aspect-Oriented Programming (AOP) in .NETAspect-Oriented Programming (AOP) in .NET
Aspect-Oriented Programming (AOP) in .NET
 
Export management ppt
Export management pptExport management ppt
Export management ppt
 
Import,export procedure
Import,export procedureImport,export procedure
Import,export procedure
 
Export procedure
Export procedureExport procedure
Export procedure
 
EXPORT PROCEDURE & DOCUMENTATION
EXPORT PROCEDURE & DOCUMENTATIONEXPORT PROCEDURE & DOCUMENTATION
EXPORT PROCEDURE & DOCUMENTATION
 
Export Procedures and Documents
Export Procedures and DocumentsExport Procedures and Documents
Export Procedures and Documents
 
Import & export presentation
Import & export presentationImport & export presentation
Import & export presentation
 
A PROJECT REPORT ON EXPORT PROCESS AND DOCUMENTATION
A PROJECT REPORT ON EXPORT PROCESS AND DOCUMENTATIONA PROJECT REPORT ON EXPORT PROCESS AND DOCUMENTATION
A PROJECT REPORT ON EXPORT PROCESS AND DOCUMENTATION
 
EXPORT IMPORT
EXPORT IMPORTEXPORT IMPORT
EXPORT IMPORT
 

Similar to cpp-2013 #18 Qt Part 2

Plasmaquick Workshop - FISL 13
Plasmaquick Workshop - FISL 13Plasmaquick Workshop - FISL 13
Plasmaquick Workshop - FISL 13Daker Fernandes
 
Qt Automotive Suite - under the hood // Qt World Summit 2017
Qt Automotive Suite - under the hood // Qt World Summit 2017Qt Automotive Suite - under the hood // Qt World Summit 2017
Qt Automotive Suite - under the hood // Qt World Summit 2017Johan Thelin
 
Archipel Introduction - ejabberd SF Meetup
Archipel Introduction - ejabberd SF MeetupArchipel Introduction - ejabberd SF Meetup
Archipel Introduction - ejabberd SF MeetupMickaël Rémond
 
Cutest technology of them all - Forum Nokia Qt Webinar December 2009
Cutest technology of them all - Forum Nokia Qt Webinar December 2009Cutest technology of them all - Forum Nokia Qt Webinar December 2009
Cutest technology of them all - Forum Nokia Qt Webinar December 2009Nokia
 
下午3 intel fenghaitao_mee_go api and application development
下午3 intel fenghaitao_mee_go api and application development下午3 intel fenghaitao_mee_go api and application development
下午3 intel fenghaitao_mee_go api and application developmentcsdnmobile
 
Supercharge your IOT toolbox with MQTT and Node-RED
Supercharge your IOT toolbox with MQTT and Node-REDSupercharge your IOT toolbox with MQTT and Node-RED
Supercharge your IOT toolbox with MQTT and Node-REDSimen Sommerfeldt
 
Lessons Learned from Real-World Deployments of Java EE 7 at JavaOne 2014
Lessons Learned from Real-World Deployments of Java EE 7 at JavaOne 2014Lessons Learned from Real-World Deployments of Java EE 7 at JavaOne 2014
Lessons Learned from Real-World Deployments of Java EE 7 at JavaOne 2014Arun Gupta
 
Introduction to node.js aka NodeJS
Introduction to node.js aka NodeJSIntroduction to node.js aka NodeJS
Introduction to node.js aka NodeJSJITENDRA KUMAR PATEL
 
Mastercoin: Reinventing Finance
Mastercoin: Reinventing FinanceMastercoin: Reinventing Finance
Mastercoin: Reinventing FinanceSean Gilligan
 
Porting Motif Applications to Qt - Webinar
Porting Motif Applications to Qt - WebinarPorting Motif Applications to Qt - Webinar
Porting Motif Applications to Qt - WebinarICS
 
Porting Motif Applications to Qt - Webinar
Porting Motif Applications to Qt - WebinarPorting Motif Applications to Qt - Webinar
Porting Motif Applications to Qt - WebinarJanel Heilbrunn
 
Kotlin Multiplatfom In Action
Kotlin Multiplatfom In ActionKotlin Multiplatfom In Action
Kotlin Multiplatfom In ActionMarko Mitic
 

Similar to cpp-2013 #18 Qt Part 2 (20)

Qt programming-using-cpp
Qt programming-using-cppQt programming-using-cpp
Qt programming-using-cpp
 
Qt Application Programming with C++ - Part 1
Qt Application Programming with C++ - Part 1Qt Application Programming with C++ - Part 1
Qt Application Programming with C++ - Part 1
 
Qt Qml
Qt QmlQt Qml
Qt Qml
 
Qt for S60
Qt for S60Qt for S60
Qt for S60
 
Plasmaquick Workshop - FISL 13
Plasmaquick Workshop - FISL 13Plasmaquick Workshop - FISL 13
Plasmaquick Workshop - FISL 13
 
QtQuick Day 1
QtQuick Day 1QtQuick Day 1
QtQuick Day 1
 
Qt Automotive Suite - under the hood // Qt World Summit 2017
Qt Automotive Suite - under the hood // Qt World Summit 2017Qt Automotive Suite - under the hood // Qt World Summit 2017
Qt Automotive Suite - under the hood // Qt World Summit 2017
 
Archipel Introduction - ejabberd SF Meetup
Archipel Introduction - ejabberd SF MeetupArchipel Introduction - ejabberd SF Meetup
Archipel Introduction - ejabberd SF Meetup
 
Cutest technology of them all - Forum Nokia Qt Webinar December 2009
Cutest technology of them all - Forum Nokia Qt Webinar December 2009Cutest technology of them all - Forum Nokia Qt Webinar December 2009
Cutest technology of them all - Forum Nokia Qt Webinar December 2009
 
下午3 intel fenghaitao_mee_go api and application development
下午3 intel fenghaitao_mee_go api and application development下午3 intel fenghaitao_mee_go api and application development
下午3 intel fenghaitao_mee_go api and application development
 
Supercharge your IOT toolbox with MQTT and Node-RED
Supercharge your IOT toolbox with MQTT and Node-REDSupercharge your IOT toolbox with MQTT and Node-RED
Supercharge your IOT toolbox with MQTT and Node-RED
 
Qt quick (qml)
Qt quick (qml)Qt quick (qml)
Qt quick (qml)
 
Lessons Learned from Real-World Deployments of Java EE 7 at JavaOne 2014
Lessons Learned from Real-World Deployments of Java EE 7 at JavaOne 2014Lessons Learned from Real-World Deployments of Java EE 7 at JavaOne 2014
Lessons Learned from Real-World Deployments of Java EE 7 at JavaOne 2014
 
Introduction to node.js aka NodeJS
Introduction to node.js aka NodeJSIntroduction to node.js aka NodeJS
Introduction to node.js aka NodeJS
 
Qt 5 - C++ and Widgets
Qt 5 - C++ and WidgetsQt 5 - C++ and Widgets
Qt 5 - C++ and Widgets
 
Mastercoin: Reinventing Finance
Mastercoin: Reinventing FinanceMastercoin: Reinventing Finance
Mastercoin: Reinventing Finance
 
Porting Motif Applications to Qt - Webinar
Porting Motif Applications to Qt - WebinarPorting Motif Applications to Qt - Webinar
Porting Motif Applications to Qt - Webinar
 
Porting Motif Applications to Qt - Webinar
Porting Motif Applications to Qt - WebinarPorting Motif Applications to Qt - Webinar
Porting Motif Applications to Qt - Webinar
 
Kotlin Multiplatfom In Action
Kotlin Multiplatfom In ActionKotlin Multiplatfom In Action
Kotlin Multiplatfom In Action
 
Google web toolkit gwt training
Google web toolkit gwt trainingGoogle web toolkit gwt training
Google web toolkit gwt training
 

More from Amazon Web Services

More from Amazon Web Services (12)

cpp-2013 #19 Concurrency
cpp-2013 #19 Concurrencycpp-2013 #19 Concurrency
cpp-2013 #19 Concurrency
 
cpp-2013 #15 Databases
cpp-2013 #15 Databasescpp-2013 #15 Databases
cpp-2013 #15 Databases
 
cpp-2013 #14 Основи Qt
cpp-2013 #14 Основи Qtcpp-2013 #14 Основи Qt
cpp-2013 #14 Основи Qt
 
cpp-2013 #13 C++11
cpp-2013 #13 C++11cpp-2013 #13 C++11
cpp-2013 #13 C++11
 
cpp-2013 #9 STL Algorithms Part 1
cpp-2013 #9 STL Algorithms Part 1cpp-2013 #9 STL Algorithms Part 1
cpp-2013 #9 STL Algorithms Part 1
 
cpp-2013 #8 STL Containers Part 2
cpp-2013 #8 STL Containers Part 2cpp-2013 #8 STL Containers Part 2
cpp-2013 #8 STL Containers Part 2
 
cpp-2013 #7 Templates and STL Containers
cpp-2013 #7 Templates and STL Containerscpp-2013 #7 Templates and STL Containers
cpp-2013 #7 Templates and STL Containers
 
cpp-2013 #6 OOP Part 2
cpp-2013 #6 OOP Part 2cpp-2013 #6 OOP Part 2
cpp-2013 #6 OOP Part 2
 
cpp-2013 #5 File and network input/output
cpp-2013 #5 File and network input/outputcpp-2013 #5 File and network input/output
cpp-2013 #5 File and network input/output
 
cpp-2013 #3 OOP Basics
cpp-2013 #3 OOP Basicscpp-2013 #3 OOP Basics
cpp-2013 #3 OOP Basics
 
cpp-2013 #2 Organizing your code
cpp-2013 #2 Organizing your codecpp-2013 #2 Organizing your code
cpp-2013 #2 Organizing your code
 
cpp-2013 #1 C++ basics
cpp-2013 #1 C++ basicscpp-2013 #1 C++ basics
cpp-2013 #1 C++ basics
 

Recently uploaded

How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 

Recently uploaded (20)

How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 

cpp-2013 #18 Qt Part 2

  • 1. Advanced Qt • Qt Creator IDE • Signals/Slots mechanism • Qt meta-system • Parent/child ownership • Copy-on-write • Bonus
  • 2. Qt Creator IDE - native IDE for Qt • free, open-source and cross-platform • full development cycle out of the box • QtWidget and QtQuick WYSIWYG design tools • fast but multifunctional • VCS integration support • debugging and profiling • project management • Qt help integration • powerful code editor • examples and tutorials • build configuration and management
  • 3. QObject and QWidget QObject - central class in Qt • base for most Qt classes • handles signals/slots • keeps meta-data • handles parent/child ownership QWidget - base for all UI classes • handles widgets positioning • any widget can be a separate window • handles UI events (mouse, keyboard etc) • can be simply ported to any platform thanks to Lighthouse
  • 4. Parent/child ownership The problem: • make complex object's lifetime control transparent for developer • prevent memory leaks and referencing deleted objects • prevent removing button while windows still visible The solution: • each QObject may have a parent QObject • parent object knows its children and vice-versa • parent removes its children • parent widget draws its children inside itself
  • 5. Copy-on-write The problem: • containers copying is usually expensive • working with pointers is inconvenient • working with const references decreases readability The solution: • many Qt classes share internal data between object copies • as soon as some object is changed, internal data are copied to prevent changing all objects
  • 6. Signals/slots • QObjects may emit signals • QObject's void method may be marked as slots • Signals and slots may be connected many-to-many. Benefits: • simple way of communication between objects • objects don't know about each other (no interfaces) • perfectly works in multithreading application • slot call can be queued for async execution • connections can be easily managed in run-time • no configuration needed, just subclass QObject • works across C++, Javascript, QML
  • 7. Qt meta-system • powered by MOC • stores information about QObject memebers • provides a way to call object method by name • empowers signals/slots mechanism • available via QMetaObject, QMetaProperty, QMetaMethod, QMetaEnum classes • empowers Javascript, QML, plugins • make it possible to have WYSIWYG designer • highly extensible
  • 8. Out of scope • Model/View architecture in Qt • Styling Qt applications • Animation in Qt applications • Qt Javascript engine • Qt plugins system • New Qt ports coming: WinRT, Android, iOS • Bindings: PyQt, RubyQt, Qt Jambi and more... • Mobile programming • Declarative programming with QtQuick