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

The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 

Recently uploaded (20)

The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 

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