SlideShare a Scribd company logo
1 of 66
Qt For Beginners - Part 1
Overview and Key Concepts
Watch the Full Video here: http://bit.ly/qt-for-
beginners
Jeff Tranter, Qt Consulting Manager
Integrated Computer Solutions
Visit us at http://www.ics.com
Copyright 2016, Integrated Computers Solutions, Inc.
This work may not be reproduced in whole or in part without the express written consent of
Integrated Computer Solutions, Inc.
1
Agenda
History of Qt
Features of Qt
C++ Refresher
Hello World Application
Core Classes
Objects and Object Communication
A Look Ahead
Q&A
2
Agenda
History of Qt
Features of Qt
C++ Refresher
Hello World Application
Core Classes
Objects and Object Communication
A Look Ahead
Q&A
3
History of Qt
Trolltech founded in 1994 (up to Qt 4.3)
Acquired by Nokia in 2008 (Qt 4.4 - 4.7)
Qt Development Frameworks founded in 2009
Under open governance
Digia acquired Qt division in 2012 (Qt 4.8+)
The Qt Company, subsidiary of Digia, founded
in 2014
4
See http://www.qt.io
See http://qt-project.org
About ICS
Founded in 1987
Trolltech/Nokia/Digia's Qt Training Partner since 2002
Provider of integrated custom software development, training,
and user experience (UX) design
For embedded, touchscreen, mobile and desktop
applications
Headquartered in Bedford, Massachusetts
Offices/staff in USA, Canada, Europe
120+ employees worldwide
5
See http://www.ics.com/
Qt Is Used Everywhere
Software: KDE, Qt Creator, Google Earth, Skype (for Linux),
VirtualBox, Spotify, VLC Media Player, AutoDesk Maya,
AutoDesk MotionBuilder, 3D Studio Max
Games: EA Origin System
Mobile UX: Sharp Zaurus (Qtopia), Nokia N8 (Symbian),
Nokia N9 (Meego), Blackberry 10 Cascades, Jolla
(Meego), Ubuntu Touch, Kobo (e-reader)
Ported to Mobile Platforms: Android, iOS, Tizen, Windows RT
Ported to Real Time Operating Systems (QNX, VXWorks,
Green Hills Integrity)
Robots: Suitable Beam
Companies: Disney Animation Studios
See Software that uses Qt or
6
See http://qt-apps.org
Agenda
History of Qt
Features of Qt
C++ Refresher
Hello World Application
Core Classes
Objects and Object Communication
A Look Ahead
Q&A
7
Why Qt?
Write code once to target multiple platforms (“Write Once,
Compile Anywhere”)
Produce compact, high-performance applications
Focus on innovation, not infrastructure coding
Choose the license that fits you: commercial, LGPL or GPL
Count on professional services, support and training
Take part in an active Qt ecosystem
8
Qt Architecture
9
The Qt Quick World
10
The OpenGL World
11
The Widget World
12
The Graphics View World
13
Using the Right Qt for You
Dual-Licensing Model
Community/Open Source:
GPL or LGPL license options
Commercial:
Qt For Device Creation
Qt For Application Development
Contact your legal team/advisor to interpret and
comply with licensing requirements
14
Giving Back - Contributing to Qt
Qt developed by a community under Open Governance
Anyone can report bugs, request enhancements, contribute
code
Need to accept the Contribution Agreement
Agreements for corporate and personal contributors
15
Agenda
History of Qt
Features of Qt
C++ Refresher
Hello World Application
Core Classes
Objects and Object Communication
A Look Ahead
Q&A
16
How Much C++ Do You Need To Know?
Objects and classes
Declaring a class, inheritance, calling member functions
etc.
Polymorphism
Virtual methods
Operator overloading
Templates
Limited to the container and concurrent classes
No...
...RTTI
...Sophisticated templates
...Exceptions
...C++11/C++14
17
Agenda
History of Qt
Features of Qt
C++ Refresher
Hello World Application
Core Classes
Objects and Object Communication
A Look Ahead
Q&A
18
Widgets - Hello World Example
// Simple C++ widgets example
#include <QApplication>
#include <QPushButton>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QPushButton hello("Hello, world!");
app.connect(&hello, SIGNAL(clicked()), &app,
SLOT(quit()));
hello.show();
return app.exec();
}
19
// Simple QML example
import QtQuick 2.6
Rectangle {
width: 200
height: 200
Text {
anchors.centerIn: parent
font.pixelSize: 18
text: "Hello, world!"
}
MouseArea {
anchors.fill: parent
onClicked: {
Qt.quit()
}
}
}
QML - Hello World Example
20
Using qmake
qmake tool
Generates a Makefile or Visual Studio project
Build project using qmake
cd helloworld
qmake helloworld.pro # creates Makefile
make # compiles and
links application
./helloworld # executes
application
Tip: qmake -project
Creates default project file based on directory content
You can run qmake from a different directory to
set up shadow build.
Qt Creator does it all for you
21
Example helloworld.pro
TEMPLATE = app # app is default - could be 'subdirs' or 'lib'
TARGET = hello # executable or library name
QT += widgets # Qt modules to use
CONFIG += debug # release is default
SOURCES += main.cpp # source files
22
Qt Assistant
Standalone help browser
Reference Documentation
All classes documented
Contains tons of examples
Collection of Howtos and Overviews
23
Qt Creator IDE
24
Finding the Answers
Documentation in Qt Assistant or Qt Creator
Qt's examples: $QTSRC/examples
Qt Project: http://www.qt.io/developers/
Qt Centre Forum: http://www.qtcentre.org/
Mailing lists: http://lists.qt-project.org
IRC: irc.freenode.org channel: #qt
Use the source! Qt's source code is easy to
read, and can answer questions the reference
docs cannot answer.
25
Modules
26
Qt Modules
Qt Essentials: includes QtCore, QtGui, QtWidgets, QtQml, QtQuick, QtSql,
QtNetwork, QtTest, QtMultimedia, QtQuickControls, etc.
Add-on Modules included with Qt 5.6: QtBlueTooth, QtDbus, QtLocation,
QtPositioning, QtSvg, QtUiTools, QtWebEngineCore, QtWebSockets,
QtXml, QtXmlPatterns, etc.
Modules contain libraries, plugins, and documentation
Enable Qt Modules in qmake .pro file:
QT += widgets xml sql dbus multimedia network
Default: qmake projects use QtCore and QtGui
QWidget based projects require QtWidgets module
QtQuick2 projects require QtQuick and QtQml modules
Every Qt class has a header file.
#include <QApplication>
#include <QGuiApplication>
#include <QCoreApplication>
#include <QString>
#include <QColor>
#include <QWidget>
Every Qt Module has a header file.
#include <QtCore>
#include <QtGui>
#include <QtWidgets>
#include <QtMultimedia>
#include <QtSql>
#include <QtConcurrent>
Many modules have a corresponding Qt class.
Module headers include all of the classes in that module.
27
More Include Files
Agenda
History of Qt
Features of Qt
C++ Refresher
Hello World Application
Core Classes
Objects and Object Communication
A Look Ahead
Q&A
28
Text Processing with QString
Strings can be created in a number of ways
Conversion constructor and assignment operators:
QString str("abc");
str = "def";
Create a numerical string using a static function:
QString n = QString::number(1234);
From a char pointer using the static functions:
QString text = QString::fromLatin1("Hello Qt");
QString text = QString::fromUtf8(inputText);
QString text = QString::fromLocal8Bit(cmdLineInput);
QString text = QStringLiteral("Literal string"); // UTF-8
From char pointer with translations:
QString text = tr("Hello Qt");
29
Text Processing with QString
QString str = str1 + str2;
fileName += ".txt";
simplified() // removes duplicate whitespace
left(), mid(), right() // part of a string
leftJustified(), rightJustified() // padded version
length(), endsWith(), startsWith()
contains(), count(), indexOf(), lastIndexOf()
toInt(), toDouble(), toLatin1(), toUtf8(), toLocal8Bit()
30
Formatted Output With QString::arg()
int i = ...;
int total = ...;
QString fileName = ...;
QString status = tr("Processing file %1 of %2: %3")
.arg(i).arg(total).arg(fileName);
double d = 12.34;
QString str = QString::fromLatin1("delta: %1").arg(d,0,'E',3)
// str == "delta: 1.234E+01";
Convenience: arg(QString,...,QString) (“multi-arg”).
Only works with all QString arguments.
31
Text Processing With QStringList
QString::split(), QStringList::join()
QStringList::replaceInStrings()
QStringList::filter()
32
Container Classes
General purpose template-based container classes
QList<QString> - Sequence Container
Other: QLinkedList, QVector, QStack, QQueue
QMap<int, QString> - Associative Container
Other: QHash, QSet, QMultiMap, QMultiHash
Qt's Container Classes compared to STL:
Lighter, safer, and easier to use than STL containers
If you prefer STL, feel free to... well.. whatever :-)
Methods exist that convert between Qt and STL
E.g. you need to pass std::list to a Qt method
33
Using Containers
Using QList
QList<QString> list;
list << "one" << "two" << "three";
QString item1 = list[1]; // "two"
for(int i = 0; i < list.count(); i++) {
const QString &item2 = list.at(i);
}
int index = list.indexOf("two"); // returns 1
Using QMap
QMap<QString, int> map;
map["Norway"] = 5; map["Italy"] = 48;
int val = map["France"]; // inserts key if not exists
if (map.contains("Norway")) {
int val2 = map.value("Norway"); // recommended lookup
}
34
Algorithm Complexity
Concern: How fast a function is as a container grows
Sequential Container
Associative Container
All complexities are amortized
35
Lookup Insert Append Prepend
QList O(1) O(n) O(1) O(1)
QVector O(1) O(n) O(1) O(n)
QLinkedList O(n) O(1) O(1) O(1)
Lookup Insert
QMap O(log(n)) O(log(n))
QHash O(1) O(1)
Iterators
Allow reading a container's content sequentially
Java-style iterators: simple and easy to use
QListIterator<...> for read
QMutableListIterator<...> for read-write
STL-style iterators slightly more efficient
QList::const_iterator for read
QList::iteratorfor read-write
Same works for QSet, QMap, QHash, ...
36
Iterators Java Style
Example QList iterator
QList<QString> list;
list << "A" << "B" << "C" << "D";
QListIterator<QString> it(list);
Forward iteration
while (it.hasNext()) {
qDebug() << it.next(); // A B C D
}
Backward iteration
it.toBack(); // position after the last item
while (it.hasPrevious()) {
qDebug() << it.previous(); // D C B A
}
37
STL-Style Iterators
Example QList iterator
QList<QString> list;
list << "A" << "B" << "C" << "D";
QList<QString>::iterator i;
Forward mutable iteration
for (i = list.begin(); i != list.end(); ++i) {
*i = (*i).toLower();
}
Backward mutable iteration
i = list.end();
while (i != list.begin()) {
--i;
*i = (*i).toLower();
}
QList<QString>::const_iterator for read-only
38
The foreach Keyword
It is a macro, feels like a keyword
foreach (const QString &str, list) {
if (str.isEmpty())
break;
qDebug() << str;
}
break and continue as normal
Modifying the container while iterating
Results in container being copied
Iteration continues in unmodified version
Not possible to modify item
Iterator variable is a const reference.
C++11 expands the for keyword for iteration over containers. C++11 auto feature
can also be useful for iterators to infer the appropriate type.
39
Agenda
History of Qt
Features of Qt
C++ Refresher
Hello World Application
Core Classes
Objects and Object Communication
A Look Ahead
Q&A
40
Implicit Sharing and Containers
Implicit Sharing
If an object is copied, then its data is copied only when the
data of one of the objects is changed ("copy on write")
Shared class has a pointer to shared data block
Shared data block = reference counter and actual data
Assignment is a shallow copy
Changing results into deep copy (detach)
QList<int> list1, list2;
list1 << 1 << 2;
list2 = list1; // shallow-copy: shares data with list1
list2 << 3; // deep-copy: change triggers detach
41
Qt's C++ Object Model - QObject
QObject is the heart of Qt's object model
Include these features:
Memory management
Object properties
Introspection
Signals and Slots
Event handling
QObject has no visual representation
42
Object Trees
QObjects organize themselves in object trees
Based on parent-child relationship
QObject(QObject *parent = 0)
Parent adds object to list of children
Parent owns children
Construction/Destruction
Trees can be constructed in any order
Trees can be destroyed in any order
If object has a parent: object is first removed from the parent
If object has children: deletes each child first
No object is deleted twice
Note: Parent-child relationship is not inheritance!
43
Creating Objects - General Guidelines
On Heap - QObject with parent
QTimer *timer = new QTimer(this);
On Stack - QObject without parent:
QFile, usually local to a function
QApplication (local to main())
QSettings, lightweight to create, local to a function
On Stack - value types
QString, QList, QHash, QMap, QColor, QImage,
QPixmap, QVariant
Stack or Heap - QDialog - depending on
lifetime
44
QVariant
QVariant
Union for common Qt "value types" (copyable, assignable)
Supports implicit sharing (fast copying)
Supports user types
A generic data object
Use cases:
QVariant property(const char *name) const;
void setProperty(const char *name, const QVariant &value);
class QAbstractItemModel {
virtual QVariant data(const QModelIndex &index, int role);
…
};
45
QVariant
For QtCore types
QVariant variant(42);
int value = variant.toInt(); // read back as integer
QString text = variant.toString(); // read back as string
qDebug() << variant.typeName(); // int
For non-core and custom types:
QVariant variant = QVariant::fromValue(QColor(Qt::red));
QColor color = variant.value<QColor>(); // read back
qDebug() << variant.typeName(); // "QColor"
46
Q_OBJECT - flag for MOC
Meta Object Compiler (MOC)
Q_OBJECT
Enhances QObject with QMetaObject information
Required for Q_PROPERTY, QObject::metaObject(), qobject_cast, etc.
Required for signals, slots, and QMetaObject::invokeMethod()
moc creates generates the QMetaObject code for each
Q_OBJECT
moc -o moc_myclass.cpp myclass.h
c++ -c myclass.cpp
c++ -c moc_myclass.cpp
c++ -o myapp moc_myclass.o myclass.o
Makefiles generated by qmake take care of making the
Q_OBJECT-marked classes automatically for you.
47
Properties
Qt Quick example
import QtQuick 2.0
Rectangle {
width: 400; height: 400
color: "lightblue"
}
Generic property access:
QObject *root = view->rootObject();
if (root != NULL) {
QString color = root->property("color").toString();
int width = root->property("width").toInt();
}
48
Properties
Q_PROPERTY is a macro:
Q_PROPERTY(type name READ getFunction
[WRITE setFunction] [RESET resetFunction]
[NOTIFY notifySignal] [DESIGNABLE bool]
[SCRIPTABLE bool] [STORED bool])
Property access methods:
QVariant property(const char* name) const;
void setProperty(const char* name,const QVariant& value);
If setProperty() is used to set a property name that has not
been declared as a Q_PROPERTY
Stored as a dynamic property in QObject not in QMetaObject
Hence not accessible from Qt Quick
Note:
Q_OBJECT macro is required for Q_PROPERTY to work
49
Providing Properties from QObject
class Customer : public QObject
{
Q_OBJECT
Q_PROPERTY(QString custId READ getId WRITE setId NOTIFY
idChanged);
public:
QString getId() const;
void setId(const QString& id);
signals:
void idChanged();
...
};
50
Callbacks
General Problem: How do you get from "the user clicks a
button" to your business logic?
Possible solutions
Callbacks
Based on function pointers
Traditionally not type-safe
Observer Pattern (Listener)
Based on interface classes
Needs listener registration
Many interface classes
Qt uses
Signals and slots for high-level (semantic) callbacks
Virtual methods for low-level (syntactic) events.
51
// Slider.qml
Rectangle {
id: container
...
signal valueChanged(var v)
...
MouseArea {
anchors.fill: parent
...
onPositionChanged: {
currentValue = factor * slide.x
container.valueChanged(currentValue)
}
}
...
...
Signal Emitted
Connecting Signals to Slots
52
// Spinner.qml
signal valueChanged(var v)
...
function setValue(newValue) {
if (newValue !== view.currentIndex) {
view.currentIndex = newValue
}
}
...
Slot/Method Implemented
53
Connecting Signals to Slots
QObject::connect(sliderItem, SIGNAL(valueChanged(QVariant)),
pickerItem, SLOT(setValue(QVariant)));
In C++ Code: Signal/Slot Connection Established
Connecting Signals to Slots
54
Connections {
target: slider
onValueChanged: {
picker.setValue(slider.value)
}
}
In QML Code: Signal/Slot Connection Established
Connecting Signals to Slots
55
Connection Variants
Using macros (traditional method):
connect(slider, SIGNAL(valueChanged(int)),
spinbox, SLOT(setValue(int)));
Using member functions:
connect(slider, &QSlider::valueChanged,
spinbox, &QSpinBox::setValue);
Using non-member functions:
static void printValue(int value) {...}
connect(slider, &QSlider::valueChanged, &printValue);
Using C++11 lambda functions:
connect(slider, &QSlider::valueChanged,
[=] (int value) {...});
56
Custom Slots
File: myclass.h
class MyClass : public QObject
{
Q_OBJECT // marker for moc
// …
public slots:
void setValue(int value); // a custom slot
};
File: myclass.cpp
void MyClass::setValue(int value) {
// slot implementation
}
57
Custom Signals
File: myclass.h
class MyClass : public QObject
{
Q_OBJECT // marker for moc
// …
signals:
void valueChanged(int value); // a custom signal
};
File: myclass.cpp
// No implementation for a signal!
Sending a signal
emit valueChanged(value);
58
Variations of Signal/Slot Connections
Signal to Signal connection
connect(bt, SIGNAL(clicked()), this, SIGNAL(okSignal()));
Not allowed to name parameters
connect(m_slider,SIGNAL(valueChanged(int value)),
this, SLOT(setValue(int newValue)))
59
Event Processing
Qt is an event-driven UI toolkit
Starting Event Loops
QApplication::exec() - main event loop
QDialog::exec() - modal dialogs
QThread::exec()- other threads
Generating Events
QInputEvent from GUI: keyboard, mouse, touch,
hover, etc.
By Qt itself (e.g. QTimerEvent)
Dispatching Events
by QApplicationto receiver: QObject
Key events sent to item/widget with focus
Mouse events sent to item/widget under cursor
60
More Event Processing
Processing Events
QApplication::processEvents()
Keeps the GUI responsive during long calculations
Sending Events
QApplication::sendEvent() block while event is processed
QApplication::postEvent() asynchronous, queued in event loop
Handling Events
Override QObject event handler methods
Allows you to change default behavior of Qt Widgets/Objects
Filtering Events
1. Extend QObject and define a custom event filter class
2. Override QObject::eventFilter()
3. Instantiate it, and pass it to QObject::installEventFilter()
61
Agenda
History of Qt
Features of Qt
C++ Refresher
Hello World Application
Core Classes
Objects and Object Communication
A Look Ahead
Q&A
62
A Look Ahead
Qt For Beginners Part 2 - Widgets (May 5)
Qt For Beginners Part 3 - QML and Qt Quick (May 19)
Qt For Beginners Part 4 - Doing More (June 9)
63
Widgets versus QML
Widgets:
Originally designed for desktop
Mouse and keyboard navigation
Can be used for embedded, incl. touchscreen
Stable
Qt Quick/QML:
Primarily designed for mobile/embedded
Touchscreen navigation
Declarative programming language QML backed by
JavaScript
Can be used for desktop too!
64
Thanks For Attending!
Slides will be published on SlideShare at
http://www.slideshare.net/ICSinc/presentations
Can now take some questions
65
Agenda
History of Qt
Features of Qt
C++ Refresher
Hello World Application
Core Classes
Objects and Object Communication
A Look Ahead
Q&A
66

More Related Content

What's hot

Best Practices in Qt Quick/QML - Part 1 of 4
Best Practices in Qt Quick/QML - Part 1 of 4Best Practices in Qt Quick/QML - Part 1 of 4
Best Practices in Qt Quick/QML - Part 1 of 4ICS
 
Qt Framework Events Signals Threads
Qt Framework Events Signals ThreadsQt Framework Events Signals Threads
Qt Framework Events Signals ThreadsNeera Mital
 
QVariant, QObject — Qt's not just for GUI development
QVariant, QObject — Qt's not just for GUI developmentQVariant, QObject — Qt's not just for GUI development
QVariant, QObject — Qt's not just for GUI developmentICS
 
Best Practices in Qt Quick/QML - Part I
Best Practices in Qt Quick/QML - Part IBest Practices in Qt Quick/QML - Part I
Best Practices in Qt Quick/QML - Part IICS
 
Qt Internationalization
Qt InternationalizationQt Internationalization
Qt InternationalizationICS
 
Best Practices in Qt Quick/QML - Part II
Best Practices in Qt Quick/QML - Part IIBest Practices in Qt Quick/QML - Part II
Best Practices in Qt Quick/QML - Part IIICS
 
Introduction to the Qt State Machine Framework using Qt 6
Introduction to the Qt State Machine Framework using Qt 6Introduction to the Qt State Machine Framework using Qt 6
Introduction to the Qt State Machine Framework using Qt 6ICS
 
Qt for Beginners Part 3 - QML and Qt Quick
Qt for Beginners Part 3 - QML and Qt QuickQt for Beginners Part 3 - QML and Qt Quick
Qt for Beginners Part 3 - QML and Qt QuickICS
 
Introduction to Qt Creator
Introduction to Qt CreatorIntroduction to Qt Creator
Introduction to Qt CreatorQt
 
Meet Qt 6.0
Meet Qt 6.0 Meet Qt 6.0
Meet Qt 6.0 Qt
 
Introduction to QML
Introduction to QMLIntroduction to QML
Introduction to QMLAlan Uthoff
 
In-Depth Model/View with QML
In-Depth Model/View with QMLIn-Depth Model/View with QML
In-Depth Model/View with QMLICS
 
Lessons Learned from Building 100+ C++/Qt/QML Devices
Lessons Learned from Building 100+ C++/Qt/QML DevicesLessons Learned from Building 100+ C++/Qt/QML Devices
Lessons Learned from Building 100+ C++/Qt/QML DevicesICS
 

What's hot (20)

Best Practices in Qt Quick/QML - Part 1 of 4
Best Practices in Qt Quick/QML - Part 1 of 4Best Practices in Qt Quick/QML - Part 1 of 4
Best Practices in Qt Quick/QML - Part 1 of 4
 
Introduction to Qt
Introduction to QtIntroduction to Qt
Introduction to Qt
 
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 programming-using-cpp
Qt programming-using-cppQt programming-using-cpp
Qt programming-using-cpp
 
Qt Framework Events Signals Threads
Qt Framework Events Signals ThreadsQt Framework Events Signals Threads
Qt Framework Events Signals Threads
 
Qt Qml
Qt QmlQt Qml
Qt Qml
 
QVariant, QObject — Qt's not just for GUI development
QVariant, QObject — Qt's not just for GUI developmentQVariant, QObject — Qt's not just for GUI development
QVariant, QObject — Qt's not just for GUI development
 
Best Practices in Qt Quick/QML - Part I
Best Practices in Qt Quick/QML - Part IBest Practices in Qt Quick/QML - Part I
Best Practices in Qt Quick/QML - Part I
 
Qt Internationalization
Qt InternationalizationQt Internationalization
Qt Internationalization
 
Best Practices in Qt Quick/QML - Part II
Best Practices in Qt Quick/QML - Part IIBest Practices in Qt Quick/QML - Part II
Best Practices in Qt Quick/QML - Part II
 
Introduction to the Qt State Machine Framework using Qt 6
Introduction to the Qt State Machine Framework using Qt 6Introduction to the Qt State Machine Framework using Qt 6
Introduction to the Qt State Machine Framework using Qt 6
 
Qt for Beginners Part 3 - QML and Qt Quick
Qt for Beginners Part 3 - QML and Qt QuickQt for Beginners Part 3 - QML and Qt Quick
Qt for Beginners Part 3 - QML and Qt Quick
 
Qt Application Programming with C++ - Part 2
Qt Application Programming with C++ - Part 2Qt Application Programming with C++ - Part 2
Qt Application Programming with C++ - Part 2
 
Introduction to Qt Creator
Introduction to Qt CreatorIntroduction to Qt Creator
Introduction to Qt Creator
 
Meet Qt 6.0
Meet Qt 6.0 Meet Qt 6.0
Meet Qt 6.0
 
Introduction to QML
Introduction to QMLIntroduction to QML
Introduction to QML
 
UI Programming with Qt-Quick and QML
UI Programming with Qt-Quick and QMLUI Programming with Qt-Quick and QML
UI Programming with Qt-Quick and QML
 
Qt for beginners
Qt for beginnersQt for beginners
Qt for beginners
 
In-Depth Model/View with QML
In-Depth Model/View with QMLIn-Depth Model/View with QML
In-Depth Model/View with QML
 
Lessons Learned from Building 100+ C++/Qt/QML Devices
Lessons Learned from Building 100+ C++/Qt/QML DevicesLessons Learned from Building 100+ C++/Qt/QML Devices
Lessons Learned from Building 100+ C++/Qt/QML Devices
 

Similar to Qt for beginners part 1 overview and key concepts

Qt for beginners part 4 doing more
Qt for beginners part 4   doing moreQt for beginners part 4   doing more
Qt for beginners part 4 doing moreICS
 
Qt for Python
Qt for PythonQt for Python
Qt for PythonICS
 
Building Cross-Platform Apps using Qt and Qyoto
Building Cross-Platform Apps using Qt and QyotoBuilding Cross-Platform Apps using Qt and Qyoto
Building Cross-Platform Apps using Qt and QyotoJeff Alstadt
 
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
 
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
 
Plasmaquick Workshop - FISL 13
Plasmaquick Workshop - FISL 13Plasmaquick Workshop - FISL 13
Plasmaquick Workshop - FISL 13Daker Fernandes
 
Developing and Benchmarking Qt applications on Hawkboard with Xgxperf
Developing and Benchmarking Qt applications on Hawkboard with XgxperfDeveloping and Benchmarking Qt applications on Hawkboard with Xgxperf
Developing and Benchmarking Qt applications on Hawkboard with XgxperfPrabindh Sundareson
 
So I Downloaded Qt, Now What?
So I Downloaded Qt, Now What?So I Downloaded Qt, Now What?
So I Downloaded Qt, Now What?Janel Heilbrunn
 
So I downloaded Qt, Now What?
So I downloaded Qt, Now What?So I downloaded Qt, Now What?
So I downloaded Qt, Now What?ICS
 
QT 프로그래밍 기초(basic of QT programming tutorial)
QT 프로그래밍 기초(basic of QT programming tutorial)QT 프로그래밍 기초(basic of QT programming tutorial)
QT 프로그래밍 기초(basic of QT programming tutorial)Hansol Kang
 
The Ring programming language version 1.8 book - Part 77 of 202
The Ring programming language version 1.8 book - Part 77 of 202The Ring programming language version 1.8 book - Part 77 of 202
The Ring programming language version 1.8 book - Part 77 of 202Mahmoud Samir Fayed
 
Integrazione QML / C++
Integrazione QML / C++Integrazione QML / C++
Integrazione QML / C++Paolo Sereno
 
Untitled presentation(4)
Untitled presentation(4)Untitled presentation(4)
Untitled presentation(4)chan20kaur
 
下午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
 

Similar to Qt for beginners part 1 overview and key concepts (20)

Treinamento Qt básico - aula I
Treinamento Qt básico - aula ITreinamento Qt básico - aula I
Treinamento Qt básico - aula I
 
Qt for beginners part 4 doing more
Qt for beginners part 4   doing moreQt for beginners part 4   doing more
Qt for beginners part 4 doing more
 
Qt for Python
Qt for PythonQt for Python
Qt for Python
 
Qt
QtQt
Qt
 
Qt for S60
Qt for S60Qt for S60
Qt for S60
 
Building Cross-Platform Apps using Qt and Qyoto
Building Cross-Platform Apps using Qt and QyotoBuilding Cross-Platform Apps using Qt and Qyoto
Building Cross-Platform Apps using Qt and Qyoto
 
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
 
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
 
Plasmaquick Workshop - FISL 13
Plasmaquick Workshop - FISL 13Plasmaquick Workshop - FISL 13
Plasmaquick Workshop - FISL 13
 
Developing and Benchmarking Qt applications on Hawkboard with Xgxperf
Developing and Benchmarking Qt applications on Hawkboard with XgxperfDeveloping and Benchmarking Qt applications on Hawkboard with Xgxperf
Developing and Benchmarking Qt applications on Hawkboard with Xgxperf
 
So I Downloaded Qt, Now What?
So I Downloaded Qt, Now What?So I Downloaded Qt, Now What?
So I Downloaded Qt, Now What?
 
So I downloaded Qt, Now What?
So I downloaded Qt, Now What?So I downloaded Qt, Now What?
So I downloaded Qt, Now What?
 
QT 프로그래밍 기초(basic of QT programming tutorial)
QT 프로그래밍 기초(basic of QT programming tutorial)QT 프로그래밍 기초(basic of QT programming tutorial)
QT 프로그래밍 기초(basic of QT programming tutorial)
 
The Ring programming language version 1.8 book - Part 77 of 202
The Ring programming language version 1.8 book - Part 77 of 202The Ring programming language version 1.8 book - Part 77 of 202
The Ring programming language version 1.8 book - Part 77 of 202
 
Integrazione QML / C++
Integrazione QML / C++Integrazione QML / C++
Integrazione QML / C++
 
Untitled presentation(4)
Untitled presentation(4)Untitled presentation(4)
Untitled presentation(4)
 
Qt coin3d soqt
Qt coin3d soqtQt coin3d soqt
Qt coin3d soqt
 
下午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
 
Cross Platform Qt
Cross Platform QtCross Platform Qt
Cross Platform Qt
 

More from ICS

The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Practical Advice for FDA’s 510(k) Requirements.pdf
Practical Advice for FDA’s 510(k) Requirements.pdfPractical Advice for FDA’s 510(k) Requirements.pdf
Practical Advice for FDA’s 510(k) Requirements.pdfICS
 
Accelerating Development of a Safety-Critical Cobot Welding System with Qt/QM...
Accelerating Development of a Safety-Critical Cobot Welding System with Qt/QM...Accelerating Development of a Safety-Critical Cobot Welding System with Qt/QM...
Accelerating Development of a Safety-Critical Cobot Welding System with Qt/QM...ICS
 
Overcoming CMake Configuration Issues Webinar
Overcoming CMake Configuration Issues WebinarOvercoming CMake Configuration Issues Webinar
Overcoming CMake Configuration Issues WebinarICS
 
Enhancing Quality and Test in Medical Device Design - Part 2.pdf
Enhancing Quality and Test in Medical Device Design - Part 2.pdfEnhancing Quality and Test in Medical Device Design - Part 2.pdf
Enhancing Quality and Test in Medical Device Design - Part 2.pdfICS
 
Designing and Managing IoT Devices for Rapid Deployment - Webinar.pdf
Designing and Managing IoT Devices for Rapid Deployment - Webinar.pdfDesigning and Managing IoT Devices for Rapid Deployment - Webinar.pdf
Designing and Managing IoT Devices for Rapid Deployment - Webinar.pdfICS
 
Quality and Test in Medical Device Design - Part 1.pdf
Quality and Test in Medical Device Design - Part 1.pdfQuality and Test in Medical Device Design - Part 1.pdf
Quality and Test in Medical Device Design - Part 1.pdfICS
 
Creating Digital Twins Using Rapid Development Techniques.pdf
Creating Digital Twins Using Rapid Development Techniques.pdfCreating Digital Twins Using Rapid Development Techniques.pdf
Creating Digital Twins Using Rapid Development Techniques.pdfICS
 
Secure Your Medical Devices From the Ground Up
Secure Your Medical Devices From the Ground Up Secure Your Medical Devices From the Ground Up
Secure Your Medical Devices From the Ground Up ICS
 
Cybersecurity and Software Updates in Medical Devices.pdf
Cybersecurity and Software Updates in Medical Devices.pdfCybersecurity and Software Updates in Medical Devices.pdf
Cybersecurity and Software Updates in Medical Devices.pdfICS
 
MDG Panel - Creating Expert Level GUIs for Complex Medical Devices
MDG Panel - Creating Expert Level GUIs for Complex Medical DevicesMDG Panel - Creating Expert Level GUIs for Complex Medical Devices
MDG Panel - Creating Expert Level GUIs for Complex Medical DevicesICS
 
How to Craft a Winning IOT Device Management Solution
How to Craft a Winning IOT Device Management SolutionHow to Craft a Winning IOT Device Management Solution
How to Craft a Winning IOT Device Management SolutionICS
 
Bridging the Gap Between Development and Regulatory Teams
Bridging the Gap Between Development and Regulatory TeamsBridging the Gap Between Development and Regulatory Teams
Bridging the Gap Between Development and Regulatory TeamsICS
 
IoT Device Fleet Management: Create a Robust Solution with Azure
IoT Device Fleet Management: Create a Robust Solution with AzureIoT Device Fleet Management: Create a Robust Solution with Azure
IoT Device Fleet Management: Create a Robust Solution with AzureICS
 
Basic Cmake for Qt Users
Basic Cmake for Qt UsersBasic Cmake for Qt Users
Basic Cmake for Qt UsersICS
 
Software Update Mechanisms: Selecting the Best Solutin for Your Embedded Linu...
Software Update Mechanisms: Selecting the Best Solutin for Your Embedded Linu...Software Update Mechanisms: Selecting the Best Solutin for Your Embedded Linu...
Software Update Mechanisms: Selecting the Best Solutin for Your Embedded Linu...ICS
 
Qt Installer Framework
Qt Installer FrameworkQt Installer Framework
Qt Installer FrameworkICS
 
Bridging the Gap Between Development and Regulatory Teams
Bridging the Gap Between Development and Regulatory TeamsBridging the Gap Between Development and Regulatory Teams
Bridging the Gap Between Development and Regulatory TeamsICS
 
Overcome Hardware And Software Challenges - Medical Device Case Study
Overcome Hardware And Software Challenges - Medical Device Case StudyOvercome Hardware And Software Challenges - Medical Device Case Study
Overcome Hardware And Software Challenges - Medical Device Case StudyICS
 
User Experience Design for IoT
User Experience Design for IoTUser Experience Design for IoT
User Experience Design for IoTICS
 

More from ICS (20)

The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Practical Advice for FDA’s 510(k) Requirements.pdf
Practical Advice for FDA’s 510(k) Requirements.pdfPractical Advice for FDA’s 510(k) Requirements.pdf
Practical Advice for FDA’s 510(k) Requirements.pdf
 
Accelerating Development of a Safety-Critical Cobot Welding System with Qt/QM...
Accelerating Development of a Safety-Critical Cobot Welding System with Qt/QM...Accelerating Development of a Safety-Critical Cobot Welding System with Qt/QM...
Accelerating Development of a Safety-Critical Cobot Welding System with Qt/QM...
 
Overcoming CMake Configuration Issues Webinar
Overcoming CMake Configuration Issues WebinarOvercoming CMake Configuration Issues Webinar
Overcoming CMake Configuration Issues Webinar
 
Enhancing Quality and Test in Medical Device Design - Part 2.pdf
Enhancing Quality and Test in Medical Device Design - Part 2.pdfEnhancing Quality and Test in Medical Device Design - Part 2.pdf
Enhancing Quality and Test in Medical Device Design - Part 2.pdf
 
Designing and Managing IoT Devices for Rapid Deployment - Webinar.pdf
Designing and Managing IoT Devices for Rapid Deployment - Webinar.pdfDesigning and Managing IoT Devices for Rapid Deployment - Webinar.pdf
Designing and Managing IoT Devices for Rapid Deployment - Webinar.pdf
 
Quality and Test in Medical Device Design - Part 1.pdf
Quality and Test in Medical Device Design - Part 1.pdfQuality and Test in Medical Device Design - Part 1.pdf
Quality and Test in Medical Device Design - Part 1.pdf
 
Creating Digital Twins Using Rapid Development Techniques.pdf
Creating Digital Twins Using Rapid Development Techniques.pdfCreating Digital Twins Using Rapid Development Techniques.pdf
Creating Digital Twins Using Rapid Development Techniques.pdf
 
Secure Your Medical Devices From the Ground Up
Secure Your Medical Devices From the Ground Up Secure Your Medical Devices From the Ground Up
Secure Your Medical Devices From the Ground Up
 
Cybersecurity and Software Updates in Medical Devices.pdf
Cybersecurity and Software Updates in Medical Devices.pdfCybersecurity and Software Updates in Medical Devices.pdf
Cybersecurity and Software Updates in Medical Devices.pdf
 
MDG Panel - Creating Expert Level GUIs for Complex Medical Devices
MDG Panel - Creating Expert Level GUIs for Complex Medical DevicesMDG Panel - Creating Expert Level GUIs for Complex Medical Devices
MDG Panel - Creating Expert Level GUIs for Complex Medical Devices
 
How to Craft a Winning IOT Device Management Solution
How to Craft a Winning IOT Device Management SolutionHow to Craft a Winning IOT Device Management Solution
How to Craft a Winning IOT Device Management Solution
 
Bridging the Gap Between Development and Regulatory Teams
Bridging the Gap Between Development and Regulatory TeamsBridging the Gap Between Development and Regulatory Teams
Bridging the Gap Between Development and Regulatory Teams
 
IoT Device Fleet Management: Create a Robust Solution with Azure
IoT Device Fleet Management: Create a Robust Solution with AzureIoT Device Fleet Management: Create a Robust Solution with Azure
IoT Device Fleet Management: Create a Robust Solution with Azure
 
Basic Cmake for Qt Users
Basic Cmake for Qt UsersBasic Cmake for Qt Users
Basic Cmake for Qt Users
 
Software Update Mechanisms: Selecting the Best Solutin for Your Embedded Linu...
Software Update Mechanisms: Selecting the Best Solutin for Your Embedded Linu...Software Update Mechanisms: Selecting the Best Solutin for Your Embedded Linu...
Software Update Mechanisms: Selecting the Best Solutin for Your Embedded Linu...
 
Qt Installer Framework
Qt Installer FrameworkQt Installer Framework
Qt Installer Framework
 
Bridging the Gap Between Development and Regulatory Teams
Bridging the Gap Between Development and Regulatory TeamsBridging the Gap Between Development and Regulatory Teams
Bridging the Gap Between Development and Regulatory Teams
 
Overcome Hardware And Software Challenges - Medical Device Case Study
Overcome Hardware And Software Challenges - Medical Device Case StudyOvercome Hardware And Software Challenges - Medical Device Case Study
Overcome Hardware And Software Challenges - Medical Device Case Study
 
User Experience Design for IoT
User Experience Design for IoTUser Experience Design for IoT
User Experience Design for IoT
 

Recently uploaded

Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedSector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedDelhi Call girls
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park masabamasaba
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
Pharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyPharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyAnusha Are
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...kalichargn70th171
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxalwaysnagaraju26
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...Jittipong Loespradit
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfayushiqss
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdfPearlKirahMaeRagusta1
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...Nitya salvi
 

Recently uploaded (20)

Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedSector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Pharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyPharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodology
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 

Qt for beginners part 1 overview and key concepts

  • 1. Qt For Beginners - Part 1 Overview and Key Concepts Watch the Full Video here: http://bit.ly/qt-for- beginners Jeff Tranter, Qt Consulting Manager Integrated Computer Solutions Visit us at http://www.ics.com Copyright 2016, Integrated Computers Solutions, Inc. This work may not be reproduced in whole or in part without the express written consent of Integrated Computer Solutions, Inc. 1
  • 2. Agenda History of Qt Features of Qt C++ Refresher Hello World Application Core Classes Objects and Object Communication A Look Ahead Q&A 2
  • 3. Agenda History of Qt Features of Qt C++ Refresher Hello World Application Core Classes Objects and Object Communication A Look Ahead Q&A 3
  • 4. History of Qt Trolltech founded in 1994 (up to Qt 4.3) Acquired by Nokia in 2008 (Qt 4.4 - 4.7) Qt Development Frameworks founded in 2009 Under open governance Digia acquired Qt division in 2012 (Qt 4.8+) The Qt Company, subsidiary of Digia, founded in 2014 4 See http://www.qt.io See http://qt-project.org
  • 5. About ICS Founded in 1987 Trolltech/Nokia/Digia's Qt Training Partner since 2002 Provider of integrated custom software development, training, and user experience (UX) design For embedded, touchscreen, mobile and desktop applications Headquartered in Bedford, Massachusetts Offices/staff in USA, Canada, Europe 120+ employees worldwide 5 See http://www.ics.com/
  • 6. Qt Is Used Everywhere Software: KDE, Qt Creator, Google Earth, Skype (for Linux), VirtualBox, Spotify, VLC Media Player, AutoDesk Maya, AutoDesk MotionBuilder, 3D Studio Max Games: EA Origin System Mobile UX: Sharp Zaurus (Qtopia), Nokia N8 (Symbian), Nokia N9 (Meego), Blackberry 10 Cascades, Jolla (Meego), Ubuntu Touch, Kobo (e-reader) Ported to Mobile Platforms: Android, iOS, Tizen, Windows RT Ported to Real Time Operating Systems (QNX, VXWorks, Green Hills Integrity) Robots: Suitable Beam Companies: Disney Animation Studios See Software that uses Qt or 6 See http://qt-apps.org
  • 7. Agenda History of Qt Features of Qt C++ Refresher Hello World Application Core Classes Objects and Object Communication A Look Ahead Q&A 7
  • 8. Why Qt? Write code once to target multiple platforms (“Write Once, Compile Anywhere”) Produce compact, high-performance applications Focus on innovation, not infrastructure coding Choose the license that fits you: commercial, LGPL or GPL Count on professional services, support and training Take part in an active Qt ecosystem 8
  • 10. The Qt Quick World 10
  • 13. The Graphics View World 13
  • 14. Using the Right Qt for You Dual-Licensing Model Community/Open Source: GPL or LGPL license options Commercial: Qt For Device Creation Qt For Application Development Contact your legal team/advisor to interpret and comply with licensing requirements 14
  • 15. Giving Back - Contributing to Qt Qt developed by a community under Open Governance Anyone can report bugs, request enhancements, contribute code Need to accept the Contribution Agreement Agreements for corporate and personal contributors 15
  • 16. Agenda History of Qt Features of Qt C++ Refresher Hello World Application Core Classes Objects and Object Communication A Look Ahead Q&A 16
  • 17. How Much C++ Do You Need To Know? Objects and classes Declaring a class, inheritance, calling member functions etc. Polymorphism Virtual methods Operator overloading Templates Limited to the container and concurrent classes No... ...RTTI ...Sophisticated templates ...Exceptions ...C++11/C++14 17
  • 18. Agenda History of Qt Features of Qt C++ Refresher Hello World Application Core Classes Objects and Object Communication A Look Ahead Q&A 18
  • 19. Widgets - Hello World Example // Simple C++ widgets example #include <QApplication> #include <QPushButton> int main(int argc, char *argv[]) { QApplication app(argc, argv); QPushButton hello("Hello, world!"); app.connect(&hello, SIGNAL(clicked()), &app, SLOT(quit())); hello.show(); return app.exec(); } 19
  • 20. // Simple QML example import QtQuick 2.6 Rectangle { width: 200 height: 200 Text { anchors.centerIn: parent font.pixelSize: 18 text: "Hello, world!" } MouseArea { anchors.fill: parent onClicked: { Qt.quit() } } } QML - Hello World Example 20
  • 21. Using qmake qmake tool Generates a Makefile or Visual Studio project Build project using qmake cd helloworld qmake helloworld.pro # creates Makefile make # compiles and links application ./helloworld # executes application Tip: qmake -project Creates default project file based on directory content You can run qmake from a different directory to set up shadow build. Qt Creator does it all for you 21
  • 22. Example helloworld.pro TEMPLATE = app # app is default - could be 'subdirs' or 'lib' TARGET = hello # executable or library name QT += widgets # Qt modules to use CONFIG += debug # release is default SOURCES += main.cpp # source files 22
  • 23. Qt Assistant Standalone help browser Reference Documentation All classes documented Contains tons of examples Collection of Howtos and Overviews 23
  • 25. Finding the Answers Documentation in Qt Assistant or Qt Creator Qt's examples: $QTSRC/examples Qt Project: http://www.qt.io/developers/ Qt Centre Forum: http://www.qtcentre.org/ Mailing lists: http://lists.qt-project.org IRC: irc.freenode.org channel: #qt Use the source! Qt's source code is easy to read, and can answer questions the reference docs cannot answer. 25
  • 26. Modules 26 Qt Modules Qt Essentials: includes QtCore, QtGui, QtWidgets, QtQml, QtQuick, QtSql, QtNetwork, QtTest, QtMultimedia, QtQuickControls, etc. Add-on Modules included with Qt 5.6: QtBlueTooth, QtDbus, QtLocation, QtPositioning, QtSvg, QtUiTools, QtWebEngineCore, QtWebSockets, QtXml, QtXmlPatterns, etc. Modules contain libraries, plugins, and documentation Enable Qt Modules in qmake .pro file: QT += widgets xml sql dbus multimedia network Default: qmake projects use QtCore and QtGui QWidget based projects require QtWidgets module QtQuick2 projects require QtQuick and QtQml modules
  • 27. Every Qt class has a header file. #include <QApplication> #include <QGuiApplication> #include <QCoreApplication> #include <QString> #include <QColor> #include <QWidget> Every Qt Module has a header file. #include <QtCore> #include <QtGui> #include <QtWidgets> #include <QtMultimedia> #include <QtSql> #include <QtConcurrent> Many modules have a corresponding Qt class. Module headers include all of the classes in that module. 27 More Include Files
  • 28. Agenda History of Qt Features of Qt C++ Refresher Hello World Application Core Classes Objects and Object Communication A Look Ahead Q&A 28
  • 29. Text Processing with QString Strings can be created in a number of ways Conversion constructor and assignment operators: QString str("abc"); str = "def"; Create a numerical string using a static function: QString n = QString::number(1234); From a char pointer using the static functions: QString text = QString::fromLatin1("Hello Qt"); QString text = QString::fromUtf8(inputText); QString text = QString::fromLocal8Bit(cmdLineInput); QString text = QStringLiteral("Literal string"); // UTF-8 From char pointer with translations: QString text = tr("Hello Qt"); 29
  • 30. Text Processing with QString QString str = str1 + str2; fileName += ".txt"; simplified() // removes duplicate whitespace left(), mid(), right() // part of a string leftJustified(), rightJustified() // padded version length(), endsWith(), startsWith() contains(), count(), indexOf(), lastIndexOf() toInt(), toDouble(), toLatin1(), toUtf8(), toLocal8Bit() 30
  • 31. Formatted Output With QString::arg() int i = ...; int total = ...; QString fileName = ...; QString status = tr("Processing file %1 of %2: %3") .arg(i).arg(total).arg(fileName); double d = 12.34; QString str = QString::fromLatin1("delta: %1").arg(d,0,'E',3) // str == "delta: 1.234E+01"; Convenience: arg(QString,...,QString) (“multi-arg”). Only works with all QString arguments. 31
  • 32. Text Processing With QStringList QString::split(), QStringList::join() QStringList::replaceInStrings() QStringList::filter() 32
  • 33. Container Classes General purpose template-based container classes QList<QString> - Sequence Container Other: QLinkedList, QVector, QStack, QQueue QMap<int, QString> - Associative Container Other: QHash, QSet, QMultiMap, QMultiHash Qt's Container Classes compared to STL: Lighter, safer, and easier to use than STL containers If you prefer STL, feel free to... well.. whatever :-) Methods exist that convert between Qt and STL E.g. you need to pass std::list to a Qt method 33
  • 34. Using Containers Using QList QList<QString> list; list << "one" << "two" << "three"; QString item1 = list[1]; // "two" for(int i = 0; i < list.count(); i++) { const QString &item2 = list.at(i); } int index = list.indexOf("two"); // returns 1 Using QMap QMap<QString, int> map; map["Norway"] = 5; map["Italy"] = 48; int val = map["France"]; // inserts key if not exists if (map.contains("Norway")) { int val2 = map.value("Norway"); // recommended lookup } 34
  • 35. Algorithm Complexity Concern: How fast a function is as a container grows Sequential Container Associative Container All complexities are amortized 35 Lookup Insert Append Prepend QList O(1) O(n) O(1) O(1) QVector O(1) O(n) O(1) O(n) QLinkedList O(n) O(1) O(1) O(1) Lookup Insert QMap O(log(n)) O(log(n)) QHash O(1) O(1)
  • 36. Iterators Allow reading a container's content sequentially Java-style iterators: simple and easy to use QListIterator<...> for read QMutableListIterator<...> for read-write STL-style iterators slightly more efficient QList::const_iterator for read QList::iteratorfor read-write Same works for QSet, QMap, QHash, ... 36
  • 37. Iterators Java Style Example QList iterator QList<QString> list; list << "A" << "B" << "C" << "D"; QListIterator<QString> it(list); Forward iteration while (it.hasNext()) { qDebug() << it.next(); // A B C D } Backward iteration it.toBack(); // position after the last item while (it.hasPrevious()) { qDebug() << it.previous(); // D C B A } 37
  • 38. STL-Style Iterators Example QList iterator QList<QString> list; list << "A" << "B" << "C" << "D"; QList<QString>::iterator i; Forward mutable iteration for (i = list.begin(); i != list.end(); ++i) { *i = (*i).toLower(); } Backward mutable iteration i = list.end(); while (i != list.begin()) { --i; *i = (*i).toLower(); } QList<QString>::const_iterator for read-only 38
  • 39. The foreach Keyword It is a macro, feels like a keyword foreach (const QString &str, list) { if (str.isEmpty()) break; qDebug() << str; } break and continue as normal Modifying the container while iterating Results in container being copied Iteration continues in unmodified version Not possible to modify item Iterator variable is a const reference. C++11 expands the for keyword for iteration over containers. C++11 auto feature can also be useful for iterators to infer the appropriate type. 39
  • 40. Agenda History of Qt Features of Qt C++ Refresher Hello World Application Core Classes Objects and Object Communication A Look Ahead Q&A 40
  • 41. Implicit Sharing and Containers Implicit Sharing If an object is copied, then its data is copied only when the data of one of the objects is changed ("copy on write") Shared class has a pointer to shared data block Shared data block = reference counter and actual data Assignment is a shallow copy Changing results into deep copy (detach) QList<int> list1, list2; list1 << 1 << 2; list2 = list1; // shallow-copy: shares data with list1 list2 << 3; // deep-copy: change triggers detach 41
  • 42. Qt's C++ Object Model - QObject QObject is the heart of Qt's object model Include these features: Memory management Object properties Introspection Signals and Slots Event handling QObject has no visual representation 42
  • 43. Object Trees QObjects organize themselves in object trees Based on parent-child relationship QObject(QObject *parent = 0) Parent adds object to list of children Parent owns children Construction/Destruction Trees can be constructed in any order Trees can be destroyed in any order If object has a parent: object is first removed from the parent If object has children: deletes each child first No object is deleted twice Note: Parent-child relationship is not inheritance! 43
  • 44. Creating Objects - General Guidelines On Heap - QObject with parent QTimer *timer = new QTimer(this); On Stack - QObject without parent: QFile, usually local to a function QApplication (local to main()) QSettings, lightweight to create, local to a function On Stack - value types QString, QList, QHash, QMap, QColor, QImage, QPixmap, QVariant Stack or Heap - QDialog - depending on lifetime 44
  • 45. QVariant QVariant Union for common Qt "value types" (copyable, assignable) Supports implicit sharing (fast copying) Supports user types A generic data object Use cases: QVariant property(const char *name) const; void setProperty(const char *name, const QVariant &value); class QAbstractItemModel { virtual QVariant data(const QModelIndex &index, int role); … }; 45
  • 46. QVariant For QtCore types QVariant variant(42); int value = variant.toInt(); // read back as integer QString text = variant.toString(); // read back as string qDebug() << variant.typeName(); // int For non-core and custom types: QVariant variant = QVariant::fromValue(QColor(Qt::red)); QColor color = variant.value<QColor>(); // read back qDebug() << variant.typeName(); // "QColor" 46
  • 47. Q_OBJECT - flag for MOC Meta Object Compiler (MOC) Q_OBJECT Enhances QObject with QMetaObject information Required for Q_PROPERTY, QObject::metaObject(), qobject_cast, etc. Required for signals, slots, and QMetaObject::invokeMethod() moc creates generates the QMetaObject code for each Q_OBJECT moc -o moc_myclass.cpp myclass.h c++ -c myclass.cpp c++ -c moc_myclass.cpp c++ -o myapp moc_myclass.o myclass.o Makefiles generated by qmake take care of making the Q_OBJECT-marked classes automatically for you. 47
  • 48. Properties Qt Quick example import QtQuick 2.0 Rectangle { width: 400; height: 400 color: "lightblue" } Generic property access: QObject *root = view->rootObject(); if (root != NULL) { QString color = root->property("color").toString(); int width = root->property("width").toInt(); } 48
  • 49. Properties Q_PROPERTY is a macro: Q_PROPERTY(type name READ getFunction [WRITE setFunction] [RESET resetFunction] [NOTIFY notifySignal] [DESIGNABLE bool] [SCRIPTABLE bool] [STORED bool]) Property access methods: QVariant property(const char* name) const; void setProperty(const char* name,const QVariant& value); If setProperty() is used to set a property name that has not been declared as a Q_PROPERTY Stored as a dynamic property in QObject not in QMetaObject Hence not accessible from Qt Quick Note: Q_OBJECT macro is required for Q_PROPERTY to work 49
  • 50. Providing Properties from QObject class Customer : public QObject { Q_OBJECT Q_PROPERTY(QString custId READ getId WRITE setId NOTIFY idChanged); public: QString getId() const; void setId(const QString& id); signals: void idChanged(); ... }; 50
  • 51. Callbacks General Problem: How do you get from "the user clicks a button" to your business logic? Possible solutions Callbacks Based on function pointers Traditionally not type-safe Observer Pattern (Listener) Based on interface classes Needs listener registration Many interface classes Qt uses Signals and slots for high-level (semantic) callbacks Virtual methods for low-level (syntactic) events. 51
  • 52. // Slider.qml Rectangle { id: container ... signal valueChanged(var v) ... MouseArea { anchors.fill: parent ... onPositionChanged: { currentValue = factor * slide.x container.valueChanged(currentValue) } } ... ... Signal Emitted Connecting Signals to Slots 52
  • 53. // Spinner.qml signal valueChanged(var v) ... function setValue(newValue) { if (newValue !== view.currentIndex) { view.currentIndex = newValue } } ... Slot/Method Implemented 53 Connecting Signals to Slots
  • 54. QObject::connect(sliderItem, SIGNAL(valueChanged(QVariant)), pickerItem, SLOT(setValue(QVariant))); In C++ Code: Signal/Slot Connection Established Connecting Signals to Slots 54
  • 55. Connections { target: slider onValueChanged: { picker.setValue(slider.value) } } In QML Code: Signal/Slot Connection Established Connecting Signals to Slots 55
  • 56. Connection Variants Using macros (traditional method): connect(slider, SIGNAL(valueChanged(int)), spinbox, SLOT(setValue(int))); Using member functions: connect(slider, &QSlider::valueChanged, spinbox, &QSpinBox::setValue); Using non-member functions: static void printValue(int value) {...} connect(slider, &QSlider::valueChanged, &printValue); Using C++11 lambda functions: connect(slider, &QSlider::valueChanged, [=] (int value) {...}); 56
  • 57. Custom Slots File: myclass.h class MyClass : public QObject { Q_OBJECT // marker for moc // … public slots: void setValue(int value); // a custom slot }; File: myclass.cpp void MyClass::setValue(int value) { // slot implementation } 57
  • 58. Custom Signals File: myclass.h class MyClass : public QObject { Q_OBJECT // marker for moc // … signals: void valueChanged(int value); // a custom signal }; File: myclass.cpp // No implementation for a signal! Sending a signal emit valueChanged(value); 58
  • 59. Variations of Signal/Slot Connections Signal to Signal connection connect(bt, SIGNAL(clicked()), this, SIGNAL(okSignal())); Not allowed to name parameters connect(m_slider,SIGNAL(valueChanged(int value)), this, SLOT(setValue(int newValue))) 59
  • 60. Event Processing Qt is an event-driven UI toolkit Starting Event Loops QApplication::exec() - main event loop QDialog::exec() - modal dialogs QThread::exec()- other threads Generating Events QInputEvent from GUI: keyboard, mouse, touch, hover, etc. By Qt itself (e.g. QTimerEvent) Dispatching Events by QApplicationto receiver: QObject Key events sent to item/widget with focus Mouse events sent to item/widget under cursor 60
  • 61. More Event Processing Processing Events QApplication::processEvents() Keeps the GUI responsive during long calculations Sending Events QApplication::sendEvent() block while event is processed QApplication::postEvent() asynchronous, queued in event loop Handling Events Override QObject event handler methods Allows you to change default behavior of Qt Widgets/Objects Filtering Events 1. Extend QObject and define a custom event filter class 2. Override QObject::eventFilter() 3. Instantiate it, and pass it to QObject::installEventFilter() 61
  • 62. Agenda History of Qt Features of Qt C++ Refresher Hello World Application Core Classes Objects and Object Communication A Look Ahead Q&A 62
  • 63. A Look Ahead Qt For Beginners Part 2 - Widgets (May 5) Qt For Beginners Part 3 - QML and Qt Quick (May 19) Qt For Beginners Part 4 - Doing More (June 9) 63
  • 64. Widgets versus QML Widgets: Originally designed for desktop Mouse and keyboard navigation Can be used for embedded, incl. touchscreen Stable Qt Quick/QML: Primarily designed for mobile/embedded Touchscreen navigation Declarative programming language QML backed by JavaScript Can be used for desktop too! 64
  • 65. Thanks For Attending! Slides will be published on SlideShare at http://www.slideshare.net/ICSinc/presentations Can now take some questions 65
  • 66. Agenda History of Qt Features of Qt C++ Refresher Hello World Application Core Classes Objects and Object Communication A Look Ahead Q&A 66