Qt5 is a cross-platform application development framework that allows developers to write applications once and deploy them across many operating systems, it provides tools like Qt Creator for building graphical user interfaces and libraries for tasks like networking, multimedia, and data storage, and it uses C++ for application logic with the option of using QML and JavaScript for declarative user interface development.
After an overview of Qt and its tools, a Hello World application quickly demonstrates the basic principles.
Qt is mainly famous for its intelligent concepts of signals and slots, which is explained together with examples for how to use widgets (UI controls).
At the end, the foundations of the meta-object system and its implications on memory management are explained.
This module follows up the introduction in the "Software Development with Qt" module, plus the Quickstart slides.
Qt Creator IDE 101 – Qt Creator is a complete integrated development environment (IDE) for creating applications with the Qt application framework.
This session will give a brief 10 minute introduction in Qt tooling, then we will dive into a 35 minute introduction to Qt Creator, showing how to set-up and get started with this IDE.
The main goal for Qt Creator is meeting the development needs of Qt developers who are looking for simplicity, usability, productivity, extendibility & openness, while aiming to lower the barrier of entry for newcomers to Qt. Being focused on Qt development it provides an integrated development environment for both desktop as well as embedded development. Get started with Qt application development quickly & easily with project wizards, & quickly access recent projects & sessions.
Learn more at www.resources.qt.io
Try Qt for free at https://www.qt.io/download
Qt Application Programming with C++ is one of the best Qt QML training and courses in Bangalore India. This workshop is ideal for anyone who want to get started with developing GUI Application using Qt framework. Starting with basics, this workshop covers developing multi-threaded, multimedia and 2D graphics based applications with multiple Do-It-Yourself (DIY) exercises.
How to write multi threaded applications using Qt:
In the slides you'll learn about 3 alternatives, all of which allow running tasks simultaneously in Qt applications, and understand the use cases leading to choosing each.
After an overview of Qt and its tools, a Hello World application quickly demonstrates the basic principles.
Qt is mainly famous for its intelligent concepts of signals and slots, which is explained together with examples for how to use widgets (UI controls).
At the end, the foundations of the meta-object system and its implications on memory management are explained.
This module follows up the introduction in the "Software Development with Qt" module, plus the Quickstart slides.
Qt Creator IDE 101 – Qt Creator is a complete integrated development environment (IDE) for creating applications with the Qt application framework.
This session will give a brief 10 minute introduction in Qt tooling, then we will dive into a 35 minute introduction to Qt Creator, showing how to set-up and get started with this IDE.
The main goal for Qt Creator is meeting the development needs of Qt developers who are looking for simplicity, usability, productivity, extendibility & openness, while aiming to lower the barrier of entry for newcomers to Qt. Being focused on Qt development it provides an integrated development environment for both desktop as well as embedded development. Get started with Qt application development quickly & easily with project wizards, & quickly access recent projects & sessions.
Learn more at www.resources.qt.io
Try Qt for free at https://www.qt.io/download
Qt Application Programming with C++ is one of the best Qt QML training and courses in Bangalore India. This workshop is ideal for anyone who want to get started with developing GUI Application using Qt framework. Starting with basics, this workshop covers developing multi-threaded, multimedia and 2D graphics based applications with multiple Do-It-Yourself (DIY) exercises.
How to write multi threaded applications using Qt:
In the slides you'll learn about 3 alternatives, all of which allow running tasks simultaneously in Qt applications, and understand the use cases leading to choosing each.
With QML there is a new, fantastic way of creating a rich UI for desktop, mobile, and embedded apps. We will go over briefly the history of QML and how you can harness this new language to make your apps easier and faster to develop. We will go over the basics of QML, signals & slots, ways to protect the QML code and also talk about how to use QML with your C++ code. With QML in your tool belt, making Qt applications is quicker to develop and maintain.
Qt Quick/QML brings designers and developers together to create and collaborate. QML is a collection of technologies that can build modern and fluid interfaces for applications – quickly. Join us for part 3 of our 4 part webinar series where we explore the best of QML for mobile, embedded and desktop.
Part 3 will cover:
C++ / QML Integration
Reusing Existing C++ Code
In today’s economy, internationalization is increasingly important as our target audience has gone from being a local one to a global one. This webinar will look at what tools Qt provides for this task and cover best practices for C++ and QML, as well as the other steps you need to take to create a properly localized Qt application.
Qt Quick/QML brings designers and developers together to create and collaborate. QML is a collection of technologies that can build modern and fluid interfaces for applications – quickly. Join us for this webinar to explore the best of QML for mobile, embedded and desktop.
Part III will cover:
- C++ Backends
- Reusing existing code
- Creating QML Modules
There is ongoing confusion, and some contention, over the right way to use the QThread class. Part of the confusion comes from the uniqueness of QThread, which is significantly different from other threading classes. There are two valid patterns of QThread use, and each pattern is best suited for different use cases. Errors will arise when mixing these two patterns, or applying them inappropriately.
This presentation will look at different patterns of threading in general, and examine in detail the two usage patterns for QThread. This talk will also cover how QThread works inside, how to communicate between threads, provide examples, and point out the pitfalls to avoid.
Qt Quick/QML brings designers and developers together to create and collaborate. QML is a collection of technologies that can build modern and fluid interfaces for applications – quickly. Join us for part 1 of our 4 part webinar series where we explore the best of QML for mobile, embedded and desktop.
Part 1 will cover:
Building Blocks of QML
Qt Properties
Declarative Code
Anchors
Qt Quick/QML brings designers and developers together to create and collaborate. QML is a collection of technologies that can build modern and fluid interfaces for applications – quickly. Join us as we explore the best of QML for mobile, embedded and desktop.
Part I will cover:
- Building Blocks of QML
- Qt Properties
- Declarative Code
The model/view design pattern is the standard way of separating UI from business logic, especially when the data exchanged is dynamic. In a series of blog posts released in May, we presented an introduction to model/view design and provided an example of how this pattern is leveraged in Qt applications. In this webinar, we will go more in depth, illustrating model/view with a set of two QML programming examples. The first will consider the simple case where data size remains constant. The second will cover the more common situation where data size is dynamic.
Qt Quick/QML brings designers and developers together to create and collaborate. QML is a collection of technologies that can build modern and fluid interfaces for applications – quickly. Join us for this webinar to explore the best of QML for mobile, embedded and desktop.
Part IV will cover:
- Dynamic Item Creation
- Keyboard Input Handling
QVariant, QObject — Qt's not just for GUI developmentICS
In part II of our Qt for Beginners Summer Webinar Series we will explore how Qt is so much more than just a GUI toolkit. Through two classes, QObject and QVariant, Qt brings us introspection, makes it easier to manage memory in C++ and makes it easier to decouple classes.
Qt Application Programming with C++ is one of the best Qt QML training and courses in Bangalore India. This workshop is ideal for anyone who want to get started with developing GUI Application using Qt framework. Starting with basics, this workshop covers developing multi-threaded, multimedia and 2D graphics based applications with multiple Do-It-Yourself (DIY) exercises.
Interacting with the Qt Quick scene graph is a good bonus skill for any Qt developer to have. In this introductory webinar we will present this component: a graphical representation of the Item scene and an alternative method to QML coding. Proper use of the underlying scene graph can save performance at runtime. We will explore how to interact with the scene graph through a simple example and suggest when it is appropriate to use.
The next version of Qt adds a framework for defining and executing hierarchical finite state machines in Qt applications. With Qt State Machines you can effectively model how components react to events over time; these state machines are a natural extension to Qt's event-driven programming model. State machines allow you to express the behavior of your application in a more rigid, explicit way, resulting in code that's easier to test, maintain and extend. This session presents the core concepts and functionality of Qt State Machines.
Presentation by Kent Hansen held during Qt Developer Days 2009.
http://qt.nokia.com/developer/learning/elearning
This workshop is aimed for professionals with Qt programming background who want to become proficient in developing excellent GUI by taking up Qt QML QtQuick courses in Bangalore. This workshop focuses on Qt Quick that separates declarative UI design and programming logic that enables you to develop UI in a super-fast manner. It also covers QML to do rapid prototyping of the UI. Build with ample hands-on sessions, this workshop makes you realize best-in-class UI for your products.
Qt makes it really easy to write Hybrid applications: Native wrapper + HTML5/JavaScript.
This keynote covers why and how you should use Qt to write hybrid applications.
Visit me at http://ynonperek.com for more info
With QML there is a new, fantastic way of creating a rich UI for desktop, mobile, and embedded apps. We will go over briefly the history of QML and how you can harness this new language to make your apps easier and faster to develop. We will go over the basics of QML, signals & slots, ways to protect the QML code and also talk about how to use QML with your C++ code. With QML in your tool belt, making Qt applications is quicker to develop and maintain.
Qt Quick/QML brings designers and developers together to create and collaborate. QML is a collection of technologies that can build modern and fluid interfaces for applications – quickly. Join us for part 3 of our 4 part webinar series where we explore the best of QML for mobile, embedded and desktop.
Part 3 will cover:
C++ / QML Integration
Reusing Existing C++ Code
In today’s economy, internationalization is increasingly important as our target audience has gone from being a local one to a global one. This webinar will look at what tools Qt provides for this task and cover best practices for C++ and QML, as well as the other steps you need to take to create a properly localized Qt application.
Qt Quick/QML brings designers and developers together to create and collaborate. QML is a collection of technologies that can build modern and fluid interfaces for applications – quickly. Join us for this webinar to explore the best of QML for mobile, embedded and desktop.
Part III will cover:
- C++ Backends
- Reusing existing code
- Creating QML Modules
There is ongoing confusion, and some contention, over the right way to use the QThread class. Part of the confusion comes from the uniqueness of QThread, which is significantly different from other threading classes. There are two valid patterns of QThread use, and each pattern is best suited for different use cases. Errors will arise when mixing these two patterns, or applying them inappropriately.
This presentation will look at different patterns of threading in general, and examine in detail the two usage patterns for QThread. This talk will also cover how QThread works inside, how to communicate between threads, provide examples, and point out the pitfalls to avoid.
Qt Quick/QML brings designers and developers together to create and collaborate. QML is a collection of technologies that can build modern and fluid interfaces for applications – quickly. Join us for part 1 of our 4 part webinar series where we explore the best of QML for mobile, embedded and desktop.
Part 1 will cover:
Building Blocks of QML
Qt Properties
Declarative Code
Anchors
Qt Quick/QML brings designers and developers together to create and collaborate. QML is a collection of technologies that can build modern and fluid interfaces for applications – quickly. Join us as we explore the best of QML for mobile, embedded and desktop.
Part I will cover:
- Building Blocks of QML
- Qt Properties
- Declarative Code
The model/view design pattern is the standard way of separating UI from business logic, especially when the data exchanged is dynamic. In a series of blog posts released in May, we presented an introduction to model/view design and provided an example of how this pattern is leveraged in Qt applications. In this webinar, we will go more in depth, illustrating model/view with a set of two QML programming examples. The first will consider the simple case where data size remains constant. The second will cover the more common situation where data size is dynamic.
Qt Quick/QML brings designers and developers together to create and collaborate. QML is a collection of technologies that can build modern and fluid interfaces for applications – quickly. Join us for this webinar to explore the best of QML for mobile, embedded and desktop.
Part IV will cover:
- Dynamic Item Creation
- Keyboard Input Handling
QVariant, QObject — Qt's not just for GUI developmentICS
In part II of our Qt for Beginners Summer Webinar Series we will explore how Qt is so much more than just a GUI toolkit. Through two classes, QObject and QVariant, Qt brings us introspection, makes it easier to manage memory in C++ and makes it easier to decouple classes.
Qt Application Programming with C++ is one of the best Qt QML training and courses in Bangalore India. This workshop is ideal for anyone who want to get started with developing GUI Application using Qt framework. Starting with basics, this workshop covers developing multi-threaded, multimedia and 2D graphics based applications with multiple Do-It-Yourself (DIY) exercises.
Interacting with the Qt Quick scene graph is a good bonus skill for any Qt developer to have. In this introductory webinar we will present this component: a graphical representation of the Item scene and an alternative method to QML coding. Proper use of the underlying scene graph can save performance at runtime. We will explore how to interact with the scene graph through a simple example and suggest when it is appropriate to use.
The next version of Qt adds a framework for defining and executing hierarchical finite state machines in Qt applications. With Qt State Machines you can effectively model how components react to events over time; these state machines are a natural extension to Qt's event-driven programming model. State machines allow you to express the behavior of your application in a more rigid, explicit way, resulting in code that's easier to test, maintain and extend. This session presents the core concepts and functionality of Qt State Machines.
Presentation by Kent Hansen held during Qt Developer Days 2009.
http://qt.nokia.com/developer/learning/elearning
This workshop is aimed for professionals with Qt programming background who want to become proficient in developing excellent GUI by taking up Qt QML QtQuick courses in Bangalore. This workshop focuses on Qt Quick that separates declarative UI design and programming logic that enables you to develop UI in a super-fast manner. It also covers QML to do rapid prototyping of the UI. Build with ample hands-on sessions, this workshop makes you realize best-in-class UI for your products.
Qt makes it really easy to write Hybrid applications: Native wrapper + HTML5/JavaScript.
This keynote covers why and how you should use Qt to write hybrid applications.
Visit me at http://ynonperek.com for more info
The Qt Script module enables you as a Qt/C++ application developer to seamlessly integrate scripting into your application, providing script authors with an interface for working in the context of your particular Qt application. The Qt Script language is very similar to JavaScript, so many developers and designers should already find it familiar. This session gives an overview of the main steps of embedding Qt Script into an application, and covers some typical patterns of usage.
Presentation by Kent Hansen held during Qt Developer Days 2009.
http://qt.nokia.com/developer/learning/elearning
2014년 6월 21일(토)
차세대 컴퓨팅 환경을 위한 기술 세미나
(2부) WAYLAND 기반 윈도우 매니저 소개
- 윈도우 매니저 최신 동향 소개
- 오픈 소스 기반 UI/UX 소프트웨어 아키텍처 소개(컴포지터/쉘/위젯 엔진..)
- 윈도우 매니저 역할 및 기본 동작 원리
NEMO-UX TEAM
http://nemoux.net
From Hello World to the Interactive Web with Three.js: Workshop at FutureJS 2014Verold
The first workshop at the first ever FutureJS conference in Barcelona. From Three.js Hello World to building your first interactive 3D app, to connecting your web app with the Internet of Things.
Design Patterns help us solve problems in tried and tested ways.
Turns out they also help us understand our framework better, for framework developers also use patterns.
In these slides you'll see how Design Patterns are implemented by Qt framework, to better both understand patterns and Qt
Cutest technology of them all - Forum Nokia Qt Webinar December 2009Nokia
Qt now and in the future - overview of Qt and the plans for Nokia platforms. Newest features of Qt including animation framework, gestures etc. Qt for Symbian and Maemo. Qt Mobility APIs. Hybrid Applications.
This presentation and we will explore some of the more complex areas of QML and present tips, tricks, best practices and common areas of error and confusion. The material is based on real-world experience developing customer applications for mobile, embedded and desktop.
Part II covers:
- Anchors
- Creating New Items
- States and Transitions
Qt App Development - Cross-Platform Development for Android, iOS, Windows Pho...Andreas Jakl
How to create a cross-platform native app? What is Qt and which platforms does it support?
Get the latest information on the open source, C++ based framework that lets you target Android, iOS and Windows Phone - plus desktop and embedded platforms! Also contains info on contained UI technologies, the Qt dual-licensing model and the roadmap.
This webinar presents the official set of bindings to use Qt's API in your Python application. Using real examples, we will not only implement a beautiful UI, we'll illustrate how it interacts with your regular Python business logic.
Presentation on Qt Developer Frameworks for a more technical audience, including the changes in version 4.6 and support for Maemo and Symbian mobile platforms.
Guided overview of software frameworks qt frameworkBenjamin Cottrell
I walk through details of the Qt framework, explaining what it is, and how it's beneficial, and what drawbacks there are. With this information, developers can make an informed decision about choosing the Qt Framework.
Treinamento de Qt básico apresentado na semanada de tecnologia do Barão de Mauá (Ribeirão Preto/SP) usando um material provido pela Nokia com modificações.
Qt Automotive Suite - under the hood // Qt World Summit 2017Johan Thelin
Qt Automotive Suite - under the hood after one year of hacking. From the Qt World Summit 2017, Berlin, Germany.
Qt Automotive Suite was released a year ago and development is making progress. This talk be focused on technical details of new features in the Qt Application Manager, the new plugin for Qt Creator, additions to Qt IVI, changes in Neptune UI, and even things we are not going to do and why. We will discuss how those features map to the needs we observe in ongoing projects and in the future ones.
Developing and Benchmarking Qt applications on Hawkboard with XgxperfPrabindh Sundareson
Presentation for HawkTalk Webinar, July 2010. Focuses on optimised Qt development using Xgxperf, and discusses available classes in Qt for application/UI development.
Software Development Best Practices: Separating UI from Business LogicICS
One of the most effective software engineering approaches involves separating the user interface (frontend) from the business logic (backend), especially when it comes to developing embedded-devices. This practice makes it far easier to code for a single specific functionality versus coding an overall product.
In this webinar we’ll explain not only what’s involved in separating the UI from business logic in your next Qt project, but explore some of the key benefits of this approach, including:
Parallel development
Modularity
Enhanced testability
Accelerated development
Architecture that easily accommodates future changes
We’ll also touch on a few of the drawbacks, chief among them the need to implement new strategies for independent testing, build and deployment — tasks that take extra time and resources
ICS is excited to bring you our summer webinar series that will introduce you to the Qt framework. In part 1 we will cover the steps of getting you started with your first Qt application. We will explore how to start a project, how to build, where to find answers when you need them, what license issues you need to be aware of, and mostly how to have fun with it.
ICS is excited to bring you our summer webinar series that will introduce you to the Qt framework. In part I we will cover the steps of getting you started with your first Qt application. We will explore how to start a project, how to build, where to find answers when you need them, what license issues you need to be aware of, and mostly how to have fun with it.
The QNX Photon MicroGUI was a technological feat in its time. It gained popularity in the mid-1990's when QNX released a 1.44Mb bootable floppy with the QNX Operating System, the Photon GUI, networking, web browser, file browser, and several demo applications.
QNX continued to develop and support Photon through 2014, but as GUI development systems matured — and users' expectations for GUIs increased — Blackberry's QNX is now focusing on the basics of drawing to the screen (e.g. QNX Screen) and left other aspects of Graphical User Interfaces to those who do it best (e.g. Qt)
This presentation would be of particular interest to people looking to upgrade their software from an existing Photon system to Qt. It discusses the differences and similarities between the Photon and Qt application development platforms and how one may migrate from one to the other.
The QNX Photon MicroGUI was a technological feat in its time. It gained popularity in the mid-1990's when QNX released a 1.44Mb bootable floppy with the QNX Operating System, the Photon GUI, networking, web browser, file browser, and several demo applications.
QNX continued to develop and support Photon through 2014, but as GUI development systems matured — and users' expectations for GUIs increased — Blackberry's QNX is now focusing on the basics of drawing to the screen (e.g. QNX Screen) and left other aspects of Graphical User Interfaces to those who do it best (e.g. Qt)
This presentation would be of particular interest to people looking to upgrade their software from an existing Photon system to Qt. It discusses the differences and similarities between the Photon and Qt application development platforms and how one may migrate from one to the other.
Introduction to underlying technologies, the rationale of using Python and Qt as a development platform on Maemo and a short demo of a few projects built with these tools. Comparison of different bindings (PyQt vs PySide). PyQt/PySide development environments, how to develop most efficiently, how to debug, how to profile and optimize, platform caveats and gotchas.
This presentation covers rarely discussed topics of porting Qt to a new smartphone platform. Goals, strategies, and technical challenges will be discussed.
Qt is a cross-platform application framework that is widely used for developing application software with a graphical user interface.
Qt for Tizen is a community-driven port of Qt 5 to Tizen smartphones and possibly cars, tablets and notebooks. It brings the legendary programming experience of Qt to Tizen application developers.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
Let's dive deeper into the world of ODC! Ricardo Alves (OutSystems) will join us to tell all about the new Data Fabric. After that, Sezen de Bruijn (OutSystems) will get into the details on how to best design a sturdy architecture within ODC.
Neuro-symbolic is not enough, we need neuro-*semantic*Frank van Harmelen
Neuro-symbolic (NeSy) AI is on the rise. However, simply machine learning on just any symbolic structure is not sufficient to really harvest the gains of NeSy. These will only be gained when the symbolic structures have an actual semantics. I give an operational definition of semantics as “predictable inference”.
All of this illustrated with link prediction over knowledge graphs, but the argument is general.
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 3. In this session, we will cover desktop automation along with UI automation.
Topics covered:
UI automation Introduction,
UI automation Sample
Desktop automation flow
Pradeep Chinnala, Senior Consultant Automation Developer @WonderBotz and UiPath MVP
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
Sidekick Solutions uses Bonterra Impact Management (fka Social Solutions Apricot) and automation solutions to integrate data for business workflows.
We believe integration and automation are essential to user experience and the promise of efficient work through technology. Automation is the critical ingredient to realizing that full vision. We develop integration products and services for Bonterra Case Management software to support the deployment of automations for a variety of use cases.
This video focuses on the notifications, alerts, and approval requests using Slack for Bonterra Impact Management. The solutions covered in this webinar can also be deployed for Microsoft Teams.
Interested in deploying notification automations for Bonterra Impact Management? Contact us at sales@sidekicksolutionsllc.com to discuss next steps.
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
As AI technology is pushing into IT I was wondering myself, as an “infrastructure container kubernetes guy”, how get this fancy AI technology get managed from an infrastructure operational view? Is it possible to apply our lovely cloud native principals as well? What benefit’s both technologies could bring to each other?
Let me take this questions and provide you a short journey through existing deployment models and use cases for AI software. On practical examples, we discuss what cloud/on-premise strategy we may need for applying it to our own infrastructure to get it to work from an enterprise perspective. I want to give an overview about infrastructure requirements and technologies, what could be beneficial or limiting your AI use cases in an enterprise environment. An interactive Demo will give you some insides, what approaches I got already working for real.
3. A cross-platform application development
framework
●
●
●
●
Using Qt, you can write applications and user interfaces
once, and deploy them across many OS.
In June 2008 Nokia acquired Trolltech ASA to
enable the acceleration of their cross-platform
software strategy for mobile devices and desktop
applications.
In August 2012 Digia announced its plans to acquire the
Qt technology and business from Nokia.
December 19, 2012 — Digia has announced the launch of
Qt 5.
–
”Qt 5 delivers a step function increase in performance,
functionality and ease of use and will be the platform on
which full Android and iOS support will be delivered
during the coming year."
4. Qt5 overview
●
●
cross-platform, graphical, application
development toolkit
run applications on Windows, Mac OS X,
Linux, and different embedded/mobile OSs
–
●
embedded Linux like Android, iOS, Blackperry,
also some RTOS LInux OS like QNX are
supported
licensed under a professional (commercial,
closed source) and GPL/ LGPL (open source)
5. Qt5 Tools
●
Qt Creator as a main IDE tools
–
●
Qt Creator should be the first choice for Qt
beginners who want to get up and running quickly
with Qt framework
Qt Creator includes
–
–
Qt Linquist for localization
–
●
Qt Designer for easy UI designing and building
qmake to build apps to different target platforms
Qt5 development tools:
–
http://qt-project.org/doc/qt-5.1/qtdoc/topics-app-development.html
7. Qt Creator
●
Qt Creator - Originally Published at Oct '08
–
a lightweight IDE
–
supports developing for different platforms
–
open and easily extendable
–
Context-sensitive help
–
Creating, editing and navigating code
–
supports the GNU compiler (gcc) and debugger
–
supports qmake build system
8. Qt Designer
●
GUI tools for rapid software development
●
Separate easily UI from model classes
–
Much easier than manual UI coding
–
UI saved in XML files
–
Support for signals and slots mechanism
–
Support QML
9. Qt programming environment
●
●
●
●
Originally C++ based Framework
Qt5 Supports also QML with JavaScript with
support to C++ "backend" components
supports single-source cross-platform
development on Windows, Mac and Linux
desktop and different embedded and mobile
platforms (Blackberry 10, Android etc.)
KDE Desktop environment is based on Qt
Framework
10. Links for Learning Qt
●
●
Book Online: ”The Art of Building Qt
Applications”:
http://pyqt-doc-cn.googlecode.com/files/The_Art_of
If you want to program purely in Qt/C++ and
design your interfaces in code without the aid of
any design tools, take a look at the Qt Tutorials.
11. Qt5 - Getting started
●
You can select 2 different approach to develop
your Qt5 applications
●
These are
●
Qt5 Widgets – C++ based, traditional way
●
●
●
QML, declarative UI language with JavaScript
support
http://qt-project.org/doc/qt-5.1/qtdoc/gettingstarted.html
12. Qt Widgets
●
The Qt Widgets Module provides a set of UI
elements to create classic desktop-style user
interfaces
●
–
http://qt-project.org/doc/qt-5.1/qtwidgets/qtwidgets-index.html
QWidget class provides the basic capability to
render to the screen, and to handle user input
events.
13. Qt Quick (QML)
●
QtQuick and QML (Declarative UI language)
–
QtDeclarative creates a JavaScript runtime that
QML runs with a Qt/C++ application
●
●
●
can call C++ from QML and visa versa
QML is easy enough for designers also, so UI
can be prototyped very quickly with QML
You can separate backend code from UI code
easily so it enforces to use Model/View
architecture in your application
15. QtCore library
Basic data types are supported
●
●
●
●
●
Qt supports C++ basic types and basic classes
Qt's own class types are used (QString,
QVector etc.) in most cases
basic data collection structures (vector, list,
maps) are defined by Qt
Even the basic data types are predefined by Qt
Well-defined parent, child relationship between
components
16. Qt is dynamic
●
Standard C++ has efficient run-time support but
very static model
●
Qt's Object model adds more dynamic model for
creating GUI and possible to add dynamic
properties using moc compiler
17. Qt's Object model
●
●
●
●
flexibility of Qt is basicly implemented in the Qt's
Object Model.
Qt features are implemented based on QObject
using standard C++.
Qt has it's own Meta-Object Compiler (moc).
C++/GUI programming needs more flexibility and
Qt provides it.
18. Qt's features
●
●
hierarchical object trees that organize object
ownership in a natural way
efficient object communication (signals and
slots)
●
dynamic properties of Object
●
powerful events and event filters
19. Qt's features
●
guarded pointer (QPointer) is automatically set
to 0 when the referenced object is destroyed
●
●
●
normal C++ pointers become "dangling
pointers" in such cases
dynamic cast (qobject_cast) that works across
library boundaries with every class inherit from
QObject
interval driven timers that make it possible to
elegantly integrate many tasks in an eventdriven GUI
20. QObject – the base class of Qt's
Object hierarchy
●
Has Unique name (QObject::objectName())
●
has a location in an object hierarchy
●
●
can be connected to any other Qt Objects to
emit/receive signals
new dynamic properties can be added to it at
runtime
–
Note! QObject and all subclasses of QObject
have their copy constructor and assignment
operator disabled.
21. Qt data types
●
●
QtGlobal header file declares several type definitions that guarantee a
specified bit-size on all platforms supported by Qt for various basic types, for
example qint8 which is a signed char guaranteed to be 8-bit on all platforms
supported by Qt.
Source: http://qt-project.org/doc/qt-5.1/qtcore/qtglobal.html
22. QtCore Module
●
●
●
The QtCore module contains core functionality
to create business logic
Some of most important and useful classes are
listed below:
QtCore classes
●
●
●
QMetaObject - Contains meta-information about
Qt objects
QObject - The base class of all Qt objects
QVariant - Acts like a union for the most common
Qt data types
23. QtCore Module continues
●
QCoreApplication - Event loop for console Qt
applications. For UI applications see QApplication
class from QtGui module
–
●
●
Event loop is started with QCoreApplication::exec
and uses exit() to exit from the main event loop.
QEvent - is The base class of all event classes.
Event objects contain event parameters
QMetaObject class contains meta-information
●
Also there is QtConcurrent namespace high-level
APIs that make it possible to write multi-threaded
programs more easily.
24. QtCore - container classes
●
●
●
●
●
QHash - Template class that provides a hash-tablebased dictionary
QLinkedList lists
Template class that provides linked
QList - Template class that provides lists
QMap - Template class that provides a skip-listbased dictionary
QMultiHash - Convenience QHash subclass that
provides multi-valued hashes
25. QtCore container classes
●
●
●
●
●
QMultiMap - Convenience QMap subclass that
provides multi-valued maps
QSet - Template class that provides a hash-tablebased set
QStack - Template class that provides a stack
QVector - Template class that provides a dynamic
array
QVectorIterator - Java-style const iterator for
QVector and QStack
26. QtCore char/string classes
●
●
●
●
●
●
QString - Unicode character string (stores a string of
16-bit QChars)
QStringList - List of Unicode strings
QByteArray – store raw bytes or traditional 8-bits
strings (const char *)
QChar - 16-bit Unicode character
QLatin1String - wrapper for Latin-1/ASCII
encoded 8-bit string (see QString::toLocal8Bit ())
QRegExp - regular expression support for QStrings
27. QtCore - multithread classes
●
QRunnable - base class for all runnable objects
●
QThread is for Platform-independent threads
●
QThreadPool manages a collection of Qthreads
●
Note! QtConcurrent namespace provides high-level
APIs that make it possible to write multi-threaded
programs without using low-level threading
(introduced in Qt 4.4.)
28. QtCore utility classes
●
QDate - Date functions
●
QDateTime -
●
QTime - Clock time functions
●
QTimer - Repetitive and single-shot timers
●
Date and time functions
QPoint - Defines a point in the plane using
integer precision
29. QtCore model classes
●
●
●
QAbstractItemModel The abstract interface for item
model classes
QAbstractListModel Abstract model that can be
subclassed to create one-dimensional list models
QAbstractTableModelAbstract model that can be
subclassed to create table models
30. Qt Core file/XML classes
●
●
●
QtextStream - Convenient interface for reading and
writing text
QDir - Access to directory structures and their
contents
QFile - Interface for reading from and writing to
files
●
QXmlStreamReader - Fast XML streaming API
●
QXmlStreamWriter - streaming writer for XML
31. JSON
●
Starting from Qt 5.0 the Qt Core provides a set
of classes to enable parsing and generating
JSON documents.
33. QApplication and Event loop
●
●
QApplication class manages the GUI application's
control flow. It's has no graphical presentation but
it's used in programs which has an graphical user
interface.
QApplication manages application's control flow
and main setting:
34. QApplication
●
●
●
handles the application's initialization and
finalization
contains the main event loop where all events
from the event sources are processed
Setting includes mouse's wheel or double click
settings and font setting and setting UI's
look&feel style
35. QApplication
●
●
●
provides session management.
handles most system-wide and application-wide
settings (like application font or style)
For any Qt GUI application there is always one
QApplication object.
–
If you don't have GUI then use QCoreApplication
instead
36. QtWidgets
●
The QtWidgets module extends QtCore with
GUI functionality
–
●
The core class in QtWidgets module is The
QWidget class which is the base class of all
UI objects (like QMainWindow or QDialog).
Note! When you use Qt Creator or Qt designer
to create your UI you save it to XML format
–
Forms in .ui (XML) file format are compiled
during build process into C++ header files by
UIC compiler.
–
If the form is mycomponent.ui then UIC
generates ui_mycomponent.h.
37. Qt GUI before Qt 5
●
●
Prior to Qt 5.0, the Qt GUI module was the monolithic
container for all things relating to graphical user
interfaces in Qt, and included the Qt widget set, the
item views, the graphics view framework and also
printing. Starting Qt 5, these classes have been
moved to the Qt Widgets module. Printing has been
moved to the Qt Print Support module. Please note
that these modules can be excluded from a Qt
installation.
http://qt-project.org/doc/qt-5.1/qtgui/qtgui-index.html
38. Qt GUI in Qt 5
●
●
●
QWidget and all derived classes are a core part
of Qt 5 on the Desktop.
In Qt 5 you can still continue writing apps in
exactly the same way as you have been doing
with Qt 4.x.
Qt5 is mainly source compatibility with Qt 4.x
40. Layout
●
●
If some graphical Qt widget should be
displayed it need some form of layout to put
into the form.
All Qt's layouts are derived from the base
class, QLayout.
–
Layouts are geometry managers that fit into
the composition hierarchy of a graphical
interface.
41. Qt Layouts
●
There are specific layout classes in Qt:
–
QHBoxLayout, QVBoxLayout – lines up
widgets horizontally or vertically
–
QGridLayout – lays out widgets in grid
–
QStackedLayout - a stack of widgets
43. QMainWindow
●
●
When you want to create a bigger application,
which handles many kind of input data and has
lot of operation you should use main window to
create your application.
In the most Qt applications has a single
QMainWindow.
●
●
It can include many UI components (Qt
widgets).
It is the parent of all other widgets that are in
the main window.
44. QMainWindow
●
It has some common features to all kind of
desktop applications:
●
●
Menu bar
●
Status bar
●
Toolbars
●
●
A central widget
Dock regions
It's common practice to derive QMainWindow
class to create own main window class.
45. Qt widgets
●
All Qt's widgets are derived from QWidget base
class.
–
QWidget is a base class for all widgets in Qt
–
creating a new widget you have to subclass
the QWidget class.
–
it has a visual representation on the screen
–
It is a reusable building block for creating UI
–
You can form any kind of widget, but also
have to implements many methods
–
internal states, all repainting and size hinting
are managed by own widget class
46. More of QWidget
●
●
●
It's a QObject, and thus can have parents,
signals, slots, and managed children
is a QPaintDevice, the base class of all widgets
that can be draw on the screen
can handle
–
signals responsing
–
event send by other widgets,
–
mouse, keyboard, other pointer devices
–
processes etc.
48. QWidget methods
●
Some of most important methods of QWidget in
example:
●
basic things: constructor, sizeHint etc.
●
Painting: The paintEvent
●
●
Mouse interaction: mousePressEvent,
mouseMoveEvent, mouseReleaseEvent.
Timing: The QTimer object is connected to the
timeout slot
49. Classes used in UI
●
These classes doesn't have graphical
presentation but these are commonly used with
Qt widgets
●
Qt Data types: QPoint and QSize .
●
Controller classes: QApplication and QAction.
●
Layouts: QHBoxLayout, QVBoxLayout, QGridLayout,
etc.
50. Non-visual classes
●
Models: The QAbstractItemModel and its derived
classes QAbstractListModel and
QAbstractTableModel are part of Qt's
Model/View framework,
●
●
These models used as base classes for classes that
represent data for a corresponding UI components
like QListView, QtreeView, or QtableView.
Database models: These are used with
QTableView for using databases:
QSqlTableModel and QSqlRelationalModel.
53. GUI classes I
●
●
●
●
QAbstractItemModel
model classes
- abstract interface for item
QAbstractItemView - basic functionality for item
view classes
QAbstractListModel - Abstract model that can be
subclassed to create one-dimensional list models
QAbstractTableModel -Abstract model that can be
subclassed to create table models
54. GUI classes II
●
●
●
●
QAction - Abstract user interface action that can be
inserted into widgets
QActionEvent - Event that is generated when a
QAction is added, removed, or changed
QApplication - Manages the GUI application's
control flow (event loop) and main settings
QBoxLayout - Lines up child widgets horizontally
or vertically
●
QCheckBox - Checkbox
●
QComboBox - Combined button and popup list
55. Qt GUI classes III
●
QCoreApplication
applications
- Event loop for console Qt
●
QDial - Rounded range control
●
QDialog - The base class of dialog windows
●
QEvent - The base class of all event classes.
●
●
●
objects contain event parameters
QFileDialog - Dialog that allow users to select
files/dirs
QFormLayout - Manages forms of input widgets
and their associated labels
56. Qt GUI classes IV
●
QGridLayout - Lays out widgets in a grid
●
QHBoxLayout - Lines up widgets horizontally
●
●
●
●
QImage - Hardware-independent image
representation
QInputDialog - Simple input dialog
QInputEvent - The base class for events that
describe user input
QIntValidator - Validator for integer within a
specified range
57. Qt Gui classes V
●
●
QKeyEvent - Describes a key event
QLCDNumber - Displays a number with LCD-look
digits
●
QLabel - Text or image display
●
QLayout - The base class of geometry managers
●
QListView - List view onto a model
●
QListWidget - Item-based list widget
●
QMatrix - 2D transformations of a coordinate
system
58. Qt GUI classes VI
●
QMenu
●
QMenuBar -
●
QMenuItem - an menu item
●
QMessageBox - Simple Modal dialog
●
QMouseEvent -
●
- Menu widget for use in menus
menu bar
parameters describe a mouse event
QPaintDevice - The base class of objects that can be
painted
59. Qt GUI classes VII
●
●
●
QPaintEvent - Contains event parameters for paint
events
QPainter - Performs low-level painting on widgets
and other paint devices
QPicture - Paint device that records and replays
QPainter commands
●
QPixmap - Off-screen image representation
●
QPushButton - Command button
●
QRadioButton - Radio button with a text label
60. Qt GUI classes VIII
●
QScrollArea - Scrolling view onto another widget
●
QSpinBox
●
●
●
●
- Spin box widget
QSplashScreen - Splash screen that can be shown
during application startup
QSplitter - Implements a splitter widget
QStyle - Abstract base class that encapsulates the
look and feel of a GUI
QStyleFactory - Creates QStyle objects
61. Qt GUI classes IX
●
●
●
●
●
●
QTabBar - Tab bar, e.g. for use in tabbed dialogs
QTableView- Default model/view implementation of
a table view
QTableWidget - Item-based table view with a
default model
QTextBrowser - Rich text browser
QTextDocument - Holds formatted text that can be
viewed and edited using a QTextEdit
QTextEdit -Widget that is used to edit/display text
62. Qt GUI classes X
●
QToolBar - Movable panel that contains a set of
controls
●
QToolTip - balloon help
●
QTranslator - Internationalization support
●
●
●
QTreeView - Default model/view implementation of a
tree view
QTreeWidget - Tree view that uses a predefined tree
model
QVBoxLayout - Lines up widgets vertically
64. GUI programming with Qt
●
●
Qt's GUI library is very professional level
framework
This historically the most important reason why
Qt has been so successful C++ framework for
creating application.
–
KDE desktop environment has used Qt since
1996
●
http://www.kde.org/announcements/announcement.p
65. Signals and slots
●
In GUI programming, we want objects of any
kind to be able to communicate with one
another.
–
if a user clicks a Close button, we probably
want the window's close() function to be
called.
66. Signals and Slots
●
In Qt, we have an alternative to the callback
technique: signals and slots.
–
It is slightly different way of thinking GUI
events and event handling
–
C++ Macros and a preprocessor makes it
feel as if the signal-slot syntax was part of
standard C++
–
All classes that inherit from QOobject or it's
subclasses can contain signals and slots.
67. Emitting signals
●
Signals are emitted when QObject's state is
changing
–
–
●
doesn't need to care if there is any Object to
handle signals
object is like a reusable software component.
A signal is emitted when a particular event
occurs.
–
It's possible also to subclass widget and add
our own signals to them.
68. Slot
●
A slot is a function that is called in response to
a particular signal.
–
Qt's widgets have many pre-defined slots, but
it is also possible to subclass widgets and add
your own slots.
●
Also QML supports signal-slot mechanism
69. Q_OBJECT macro
●
All classes that contain signals or slots must
mention Q_OBJECT macro at the top of their
declaration.
–
must also derive (directly or indirectly) from
QObject
70. QObject::connect
●
connect function is a static function of QObject.
–
It creates connection between two QObject.
bool QObject::connect ( const QObject * sender, const char * signal, const QObject *
receiver, const char * method, Qt::ConnectionType type = Qt::AutoConnection )
QObject::connect(scrollBar, SIGNAL(valueChanged(int)), label,
●
A signal-slot connection is removed when either
of the objects involved are destroyed.
–
●
SLOT(setNum(int)));
It's possible to disconnect connection with
disconnect() method
New signal/slot syntax in Qt5:
http://qt-project.org/wiki/New_Signal_Slot_Syntax
71. Example of signals and slot
●
In the next example are used signals and
slots mechanism to connect the QSlider's
valueChanged() signal to the QLCDNumber's
display() slot.
–
Signal is emitted in event handler method
●
MousePressEvent can receive mouse press
events for the widget. Other mouse event
handlers are mouseMoveEvent and
mouseReleaseEvent.
72. Example cont.
void QSlider::mousePressEvent(...) {
emit valueChanged( newValue);
}
Slot is implemented QLCDNumber widget:
void QLCDNumber::display(int num) {
value = num;
}
Signal/Slot connection has been defined in the
following way:
connect( slider, SIGNAL( valueChanged(int) ), lcd,
SLOT( display(int) ) );
73. moc for Qt's C++ extensions
●
The meta-object compiler system in Qt:
1.The QObject class acts as a base class.
2.The Q_OBJECT, Q_PROPERTY etc. macros
inside the class declaration is used to enable
meta-object features (properties, signals,
slots...)
3.The Meta-Object Compiler (moc) supplies
each QObject subclass with the necessary
code to implement meta-object features.
✗
✗
The moc tool reads a C++ header file. If it finds one or more
class declarations that contain the Q_OBJECT macro, it
produces a C++ source file containing the meta-object code for
those classes.
74. Q_OBJECT macro
class Counter : public Qobject
{
Q_OBJECT
public:
counter() { value = 0; }
int value() const { return value; }
public slots:
void setValue(int value);
signals:
void valueChanged(int newValue);
private:
int value;
};
75. Qt's Meta Object Compiler
●
Moc provides the flexibility of Java's runtime
environments for C++.
–
maintains C++'s unique performance and
scalability advantages.
–
generates additional C++ code from the
header file which can then be compiled by any
C++ compiler
–
If you use qmake to create your makefiles,
build rules will be included that call the moc
when required.
76. How's code generation works?
I. moc reads C++ source files.
II.If class declaration contain the Q_OBJECT
macro, it produces another C++ source file
which contains the meta object code for those
class.
III.C++ source files must be linked with the
implementation of the class
IV.moc is normally automatically called during
building the program and programmer don't
have to do anything special to use moc.
77. uic (User Interface Compiler)
●
●
●
uic takes a user interface description in XML
format (.ui file) and then it can create compiled
C++ class
Qt's designer and Qt Creator uses this tool
when creating UI's
Also if you use qmake as a build tool, uic will be
invoked automatically for header files (.ui files).
–
Forms in .ui (XML) file format are compiled
during build process into C++ header files by
UIC compiler.
–
If the form is mycomponent.ui then UIC
generates ui_mycomponent.h. x
79. Qt Events
●
●
In Qt, events are objects, derived from the
abstract QEvent class, that represent things
that have happened either within an application
or as a result of outside activity that the
application needs to know about. Events can be
received and handled by any instance of a
QObject subclass, but they are especially
relevant to widgets.
http://qt-project.org/doc/qt-5.1/qtcore/eventsandfilters.html
80. Qt Event types
●
●
Most events types have special classes,
notably QResizeEvent, QPaintEvent,
QMouseEvent, QKeyEvent, and QCloseEvent.
Each class subclasses QEvent and adds
event-specific functions. For example,
QResizeEvent adds size() and oldSize() to
enable widgets to discover how their
dimensions have been changed.
81. Qt Event
●
QMouseEvent class contains parameters that
describe a mouse event (like x,y position or
keyboard modifiers or )
void MyCheckBox::mousePressEvent(QMouseEvent *event)
{
if (event>button() == Qt::LeftButton) {
// handle left mouse button here
} else {
// pass on other buttons to base class
QCheckBox::mousePressEvent(event);
}
}
82. Event handlers
void QWidget::mousePressEvent(QMouseEvent * event)
[virtual protected]
–
This event handler, for event event, can be
reimplemented in a subclass to receive
mouse press events for the widget.
void QWidget::mouseReleaseEvent(QMouseEvent * event)
[virtual protected]
–
●
This event handler can be reimplemented in
a subclass to receive mouse release events
Valid event types in Qt 5:
http://qt-project.org/doc/qt-5.1/qtcore/qevent.html#Type-enum
83. The model/view architecture
●
●
●
The model communicates with a
source of data, providing an
interface for the other
components in the architecture.
The view obtains model indexes
from the model, which are
references to data items
a delegate renders the items of
data.
–
When an item is edited, the
delegate communicates with
the model directly using
model indexes.
84. MVC architecture support
MVC implementation in Qt 4: The
model/view architecture
– easy to distinguish UI
elements from the data
– requires underlaying a data
model
● The data is fed back to the model
from the UI component
●
85. Qt Model's Views
●
Possible Views are:
–
QListView displays a list of items,
–
QTableView displays data from a model in a table,
–
QTreeView shows model items of data in a
hierarchical list.
–
Each of these classes is based on the
QAbstractItemView abstract base class
86. Item Views classes
●
Item view classes are similar than item view
classes provided by previous versions of Qt.
–
●
These are suitable for situations, where we
need to use only relatively few UI items.
Qt's convenience item view classes includes:
–
–
QTableWidget,
–
●
QListWidget,
QTreeWidget
These classes stores their data in "items"
–
QTableWidget contains QTableWidgetItems
etc.
87. QTableView
●
●
Qt's views (like QTableView, ) is used with a
data model, which can be a custom model or
one of Qt's predefined models.
If using table view model can be inherited from
QAbstractTableModel.
–
When subclassing QAbstractTableModel, you
must implement rowCount(), columnCount(),
and data().
–
Default implementations of the index() and
parent() functions are provided by
QAbstractTableModel.
88. Model classes
●
●
QAbstractItemModel is interface to data and
can handle views that represent data in the
form of tables, lists, and trees.
models for list and table-like data structures,
the QAbstractListModel and
QAbstractTableModel provides default
implementations of common functions
90. GraphicsView
●
Graphics View Framework was developed for
Qt 4.2 and it's efficient for managing and
interacting 2D graphical object in the graphical
surface.
–
Has surface for managing and interacting with
a large number of 2D graphical items
efficiently
–
Provides a view widget for visualizing the
items, with support for zooming and rotation.
–
Graphics View provides an item-based
approach to graphical programming, much like
M/V classes QTableView, QTreeView and
91. Graphics View
●
QGraphicsView
–
The base class for Graphics View framework
–
most applications are built around a twodimensional canvas
–
a feeling of a custom widget without actually
creating a custom widget.
92. Graphics View basics
●
Three basic components: view, scene,item
●
These components are
–
QGraphicsView, shows the contents of a
scene
–
QGraphicsScene
●
–
manages collection of widgets, the propagation
of events and item's state like selection or
focus.
Each graphical item has subclass of
QGraphicsItem (single item/group of items)
93. QGraphicsItem
●
QGraphicsItem supports the following
features:
–
Basic Mouse events, and mouse hover and
wheel events.
–
Key events
–
Drag and drop
–
Grouping (QGraphicsItemGroup) of
graphical items
–
Transformations like transform, rotating,
scaling
–
Collision detection
94. Collision detection
–
QGraphicsItem supports also collision
detection
●
●
–
QGraphicsItem's collision detection uses
boundingRect() method
●
–
Detection collision is one of the base demand in
games
QGraphicsItem supports collision detection
through the shape() function, and collidesWith
It defines the outer bounds of the item as a
rectangle
The more fine grained collision algorithm is
based on calling shape which returns an
accurate outline of the item's shape
95. Collision intersection
●
●
You can specify how items and shapes collide
bool QGraphicsItem::collidesWithItem ( const
QGraphicsItem * other, Qt::ItemSelectionMode
mode = Qt::IntersectsItemShape)
–
Qt::ContainsItemShape
–
Qt::IntersectsItemShape (default mode)
●
other collides with this item if it either intersects,
contains, or is contained by this item's shape
–
Qt::ContainsItemBoundingRect
–
Qt::IntersectsItemBoundingRect
96. Localization in Qt
●
●
●
increasingly important in the global software market
In localization Qt programmers task is relatively
easy to do
In the source code put Qstring object into tr()
function
–
●
QLabel mystr(tr ("Hello World !"));
Function can be used even if it's not need to translate
right now
97. Translation in a program
// Setting Locales and translators for this applications
// Now use tr() function in every String
QString locale = QLocale::system().name();
QTranslator translator;
translator.load(QString("locales_") + locale);
// Testing with finish locale setting
// translator.load(QString("locales_fi"));
app.installTranslator(&translator);
98. tr() function and lupdate
●
QObject:: tr()
Returns the translation of the text or original
copy, if a translation does not exist
lupdate
–
●
The lupdate tool is used to synchronize source
code and translations.
lrelease
–
●
–
is used to create run-time translation files for use
by the released application.
99. TS files
●
TS files are XML files
–
You can edit these files by hand or using Qt
Linquist tool
<TS version="2.0" language="fi_FI">
<context>
<name>QLabel</name>
<message>
<source>Hello Colourful QT!</source>
<translation type="unfinished">Moi Varikas
Qt</translation>
</message>
</context>
100. Qt Linquist
●
●
Can use Qt Linquist translation program can be
used for editing translation files
QM files can be created as follows
lrelease is a command line tool that produces
QM files (binary format) out of TS files
– Qt Linquist programs (File / Release)
–
101. Qt Stylesheets
You can use CSS like language
● Basic process
– Create a stylesheet file (.qss
file)
● Should be in Qt resource file
also
– Insert stylesheet into the
application
●
102. Setting Stylesheet
Using Qt stylesheet in the code is
easy
● Use application wide settings if
possible because it's easier to modify
afterwards
●
QFile file(":/qstyle.qss");
if(file.open(QFile::ReadOnly) == true) {
// open file and set it to
// the style of the Qt application
QString styleSheet(file.readAll());
103. qss stylesheet language
●
Example of defining Qt stylesheet file in .qss
file:
QLabel {
font-weight: bold;
font-size: 15px;
border: 2px solid green;
border-radius: 4px;
QLabel:enabled { color: red }
QLabel:hover:enabled { color: black }
/* pseudo classes CSS like */
padding: 2px; }
104. Defining styles
●
●
●
You can reference component directly from
QSS using object's class#name like
(QDial#ageDial)
You can define stylesheet directly in source
code into component using method
QWidget::setStyleSheet()
button->setStyleSheet(
"QPushButton {color:white; background:rgb(255,255,0);
border-radius:10px; font:bold 16px;
font-family:"Arial";}”);
105. Dynamic effects with qss
●
:focus input focus
●
:hover mouse is moving over the component
●
:pressed clicked
●
:checked,:unchecked
●
●
:open, :close expanded or not :enabled
:disabled, :on, :off .
You can create realtime effects without
modified the Qt code