Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Computer Vision with OpenCV 3 and Qt5

You're reading from   Computer Vision with OpenCV 3 and Qt5 Build visually appealing, multithreaded, cross-platform computer vision applications

Arrow left icon
Product type Paperback
Published in Jan 2018
Publisher Packt
ISBN-13 9781788472395
Length 486 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Amin Ahmadi Tazehkandi Amin Ahmadi Tazehkandi
Author Profile Icon Amin Ahmadi Tazehkandi
Amin Ahmadi Tazehkandi
Arrow right icon
View More author details
Toc

Table of Contents (19) Chapters Close

Title Page
Dedication
Packt Upsell
Foreword
Contributors
Preface
1. Introduction to OpenCV and Qt 2. Creating Our First Qt and OpenCV Project FREE CHAPTER 3. Creating a Comprehensive Qt+OpenCV Project 4. Mat and QImage 5. The Graphics View Framework 6. Image Processing in OpenCV 7. Features and Descriptors 8. Multithreading 9. Video Analysis 10. Debugging and Testing 11. Linking and Deployment 12. Qt Quick Applications 1. Other Books You May Enjoy

User interaction and scripting in QML


Responding to user actions events in QML code is done by adding scripts to slots of the items, in quite a similar way to Qt Widgets. The difference here is that each signal defined internally within a QML type also has a corresponding slot for it which is automatically generated and can be filled with a script to perform an action when the relevant signal is emitted. Well, let's see this with another example. A QML Button type has a pressed signal. This automatically means that there is an onPressed slot that you can use to code the required action of the specific button. Here's an example code:

    Button 
    { 
      onPressed:  
      { 
        // code goes here 
      } 
    } 

For a list of available slots in QML types, you can refer to the Qt documentation. As mentioned before, you can easily guess the slot name of each signal by capitalizing the first letter of the signal name and prepending on to it. Thus, for the pressed signal you'll have...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £13.99/month. Cancel anytime
Visually different images