SlideShare a Scribd company logo
1 of 46
Download to read offline
Introduction to Qt
programming
Dragoş Acostăchioaie
http://www.unixinside.org
dragos@unixinside.org
Şcoala de vară “Informatică la castel”, Macea, 25 -31 august 2014
Dragoş Acostăchioaie - http://www.unixinside.org
Qt. Code less. Create more. Deploy everywhere
✗ Qt - cross-platform application and User Interface framework
✗ supports a lot of hardware and software platforms: desktop, mobile and embedded
✗ no need to rewrite the source code
Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014
Dragoş Acostăchioaie - http://www.unixinside.org
Qt. Code less. Create more. Deploy everywhere
Desktop platforms:
✗ Linux/X11, other UNIX flavours (eg FreeBSD, Solaris, HP-UX, AIX)
✗ Linux/Wayland
✗ Mac OS
✗ Windows
Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014
Dragoş Acostăchioaie - http://www.unixinside.org
Qt. Code less. Create more. Deploy everywhere
Mobile platforms:
✗ Android
✗ iOS
✗ BlackBerry
Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014
Dragoş Acostăchioaie - http://www.unixinside.org
Qt. Code less. Create more. Deploy everywhere
✗ Embedded platforms:
✗ Embedded Android
✗ Embedded Linux
✗ Windows Embedded, Windows CE, WinRT
✗ Real-time operating systems (eg QNX, VxWorks)
Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014
Dragoş Acostăchioaie - http://www.unixinside.org
Qt. Code less. Create more. Deploy everywhere
✗ can interact with other languages (language bindings): Java (QtJambi), Ruby, C#, C++11
✗ scripting languages supported: QML (native), JavaScript, Phyton
Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014
Dragoş Acostăchioaie - http://www.unixinside.org
Qt. Code less. Create more. Deploy everywhere
IDEs supported:
✗ Qt Creator
✗ Eclipse
✗ Microsoft Visual Studio
Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014
Dragoş Acostăchioaie - http://www.unixinside.org
Qt. Code less. Create more. Deploy everywhere
Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014
✗ Write once, run everywhere - the same source code runs without changes on
different platforms (see also the porting paradigm of FLOSS solutions)
✗ Superior performances than languages running in a virtual machine (eg Java) – the
binary code is executed natively, resulting a much less resource consumption
✗ Uses the natively graphic system of the operating system – the applications have
the aspect and behaviour of the host system
✗ Porting from an operating system to another does not require source code changes – just
compile on the host platform (if no specific functionalities or libraries has been used)
✗ Ensure the source code against future host platform changes – at source or binary level;
the developers can focus on application development, not on API changes
✗ Different markets can be easily achieved – developers can target multiple OSes
✗ Less source code maintenance costs
Dragoş Acostăchioaie - http://www.unixinside.org
Qt5
Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014
First Qt5 version launched in 2012
Dragoş Acostăchioaie - http://www.unixinside.org
Qt5
Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014
✗ Modular – increase cross-platform portability
✗ Qt Essentials
✗ Qt Add-Ons
✗ Qt Tools
✗ Consolidation of Qt Platform Abstraction
Dragoş Acostăchioaie - http://www.unixinside.org
Qt5
Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014
Compatible with Qt 4
Dragoş Acostăchioaie - http://www.unixinside.org
Qt5 – A modular architecture
Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014
Essentials
✗ Qt Core - provides core non-GUI functionality
✗ Qt GUI - provides the basic enablers for graphical applications
✗ Qt Multimedia - provides audio, video, radio and camera functionality
✗ Qt Network - provides classes to make network programming easier and portable
✗ Qt QML - classes for QML and JavaScript languages
✗ Qt Quick - provides classes for embedding Qt Quick2 in Qt/C++ applications
✗ Qt SQL - provides a driver layer, SQL API layer, and a user interface layer for SQL db
✗ Qt Test - classes for unit testing Qt applications and libraries
✗ Qt WebKit - provides a web browser engine (WebKit2)
✗ Qt Widgets - extends Qt GUI with C++ widget functionality
Dragoş Acostăchioaie - http://www.unixinside.org
Qt5 – A modular architecture
Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014
Add-ons
✗ Qt Bluetooth – enables basic Bluetooth operations
✗ Qt D-Bus - Inter-Process Communication using the D-Bus protocol (UNIX-only)
✗ Qt Graphical Effects - graphical effects for use with Qt Quick 2
✗ Qt Image Formats - plugins for additional image formats
✗ Qt OpenGL - offers classes that make it easy to use OpenGL
✗ Qt Positioning - provides positioning information
✗ Qt Print Support - provides classes to make printing easier and portable
✗ Qt Sensors - Provides classes for reading sensor data
✗ Qt Serial Port - classes that enable access to a serial port
✗ Qt Script - provides classes for making Qt applications scriptable
✗ Qt Script Tools
✗ Qt SVG - provides functionality for handling SVG images
✗ Qt XML - implementations of SAX and DOM
✗ Qt XML Patterns - support for XPath, XQuery, XSLT and XML schema validation
Dragoş Acostăchioaie - http://www.unixinside.org
Qt5 – A modular architecture
Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014
Tools
✗ Qt Designer – classes for extending Qt Designer
✗ Qt Help - classes for integrating online documentation into applications
✗ Qt UI Tools - classes to handle the forms created in Qt Designer
Dragoş Acostăchioaie - http://www.unixinside.org
Qt5 – A modular architecture
Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014
Future releases may include more modules
Dragoş Acostăchioaie - http://www.unixinside.org
What's new in Qt5
Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014
✗✗ Efficient alternative to classical object communication (event listeners)
✗ Slots are member functions of the classes (inherited from Qobject),
which are called as answer for a specific signal
✗ There a pre-defined set of signals and slots
✗ A signal can be connected to multiple slots
✗ A slot can be connected to multiple signals
✗ A signal can be connected to another signal
✗ A signal is emmited when an event occurs
✗ production-ready ports for Android and iOS (since Qt 5.2)
✗ increase the graphic perfomances (OpenGL) up to 200%, due to
architectural changes
✗ better integration of Qt Quick and QML
✗ new features in Qt Quick:
✗ Canvas for drawing. Canvas provides an API that is similar to the
HTML5 Canvas API, along with some additional features
✗ Shader Effects which enable GLSL shader programs to be integrated
directly into QML code and applied to items and images
✗ Particle Effects for creating a variety of 2D particle systems
✗ Sprites can be used in animating 2D graphical objects and as a
source for particle system
Dragoş Acostăchioaie - http://www.unixinside.org
What's new in Qt5
Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014
✗ new features in Qt Quick (continued):
✗ Offline storage is a JavaScript API that conforms with the HTML5
Web Database API for storing data in Qt Quick applications
✗ Window provides a top-level window and the Screen type for
accessing a screen's resolution and other details. This is useful for
desktop applications developed using Qt Quick
✗ OpenGL-based rendering architecture for optimal performance
Dragoş Acostăchioaie - http://www.unixinside.org
What's new in Qt5
Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014
✗ Qt Quick does reduce the effort considerably compared to the traditional
native (C or C++) approach, but the new Qt Quick Controls and Qt Quick
Layouts take it a step further. These new modules provide ready-to-use
UI controls and layouts to enable faster application development and with
less code
✗ Qt Quick Controls and Qt Quick Layouts provide a vast set of UI controls
ranging from the most basic TextField and Button to the more complex
TableView and TabView. These controls are also made available in Qt
Quick Designer
✗ the new QtSensors and QtPositioning modules
✗ improved support for JavaScript and QML in Qt 5, while still having the
C++ foundation and Qt Widget support. The JavaScript backend is
powered by V8 and Qt WebKit 2 have full HTML5 support
Dragoş Acostăchioaie - http://www.unixinside.org
What's new in Qt5
Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014
✗ Qt Multimedia provides a rich set of QML types and C++ classes to
handle multimedia content. It also provides necessary APIs to access the
camera and radio functionality. Qt 5 brings the Qt Multimedia module into
the set of essential modules with support on all major platforms
✗ platform-specific extras (Qt Android Extras, Qt Mac Extras, Qt Windows
Extras, Qt X11 Extras)
✗ Qt 5 splits the Qt libraries into domain specific libraries and modules.
This means that an application can choose which libraries it requires and
only compile, use and deploy those
✗ the Qt Widgets have been separated into their own module in Qt 5, the
Qt Widgets module. It is part of the essential modules.
✗ the windowing system dependent parts of Qt have been completely
rewritten for Qt 5, based on the Qt Platform Abstraction, a plugin
architecture which allows Qt to dynamically load a windowing system
integration based on what system it is running on.
Dragoş Acostăchioaie - http://www.unixinside.org
What's new in Qt5
Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014
✗ Conectivity and networking improvements:
✗ provides better support for IPv6 and dual mode networks
✗ provides better ways to handle TCP socket-based connections and
SSL certificates
✗ the opaque Private Keys support in Qt 5 enables applications to read
private keys from devices such as PKCS#11 dongles for stricter client
authentication
✗ the new Qt Bluetooth and Qt NFC new modules
Dragoş Acostăchioaie - http://www.unixinside.org
What's new in Qt5
Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014
✗ JSON support:
✗ Qt applications that use simple data structures to store small amount
of data, can now choose to use JSON documents over the complex
database backends that need necessary drivers or plugins to access
data
✗ the Qt Core provides a set of classes to enable parsing and
generating JSON documents. These classes also allow you to
convert between an in-memory binary representation of JSON to a
standard textual JSON format.
Dragoş Acostăchioaie - http://www.unixinside.org
What's new in Qt5
Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014
✗ Qt 5 extends the multi-point touch input support to include Qt Quick,
covering all the information about the touch points, including the touch
position, pressure, and velocity
✗ the mouse event handling in Qt 5 has been improved from its
predecessor. Applications have more control to handle mouse events in
Qt Quick. The mouse area in a QML document can propagate the mouse
wheel and click events and also ignore propagated events
✗ support for more mouse buttons on platforms where this is supported.
This comes in handy for gaming applications developed using Qt
Dragoş Acostăchioaie - http://www.unixinside.org
QtWidget
Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014
✗✗ Efficient alternative to classical object communication (event listeners)
✗ Slots are member functions of the classes (inherited from Qobject),
which are called as answer for a specific signal
✗ There a pre-defined set of signals and slots
✗ A signal can be connected to multiple slots
✗ A slot can be connected to multiple signals
✗ A signal can be connected to another signal
✗ A signal is emmited when an event occurs
✗ QtWidget - the base class of all user interface objects
✗ the atom of the user interface - it receives mouse, keyboard and other
events from the window system, and paints a representation of itself on
the screen
✗ every widget is rectangular
✗ a widget without a parent widget is always an independent window (top-
level widget)
✗ non-window widgets are child widgets, displayed within their parent
widgets
✗ most widgets in Qt are mainly useful as child widgets
Dragoş Acostăchioaie - http://www.unixinside.org
Signals and slots
Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014
Dragoş Acostăchioaie - http://www.unixinside.org
Signals and slots
Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014
✗ Efficient alternative to classical object communication (event listeners)
✗ Slots are member functions of the classes (inherited from Qobject),
which are called as answer for a specific signal
✗ There a pre-defined set of signals and slots
✗ A signal can be connected to multiple slots
✗ A slot can be connected to multiple signals
✗ A signal can be connected to another signal
✗ A signal is emmited when an event occurs
Dragoş Acostăchioaie - http://www.unixinside.org
Signals and slots
Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014
✗ Declaration of slots:
[ access_type ] slots:
[ return_type ] function_name (param1, …, paramN)
✗ Declaration of signals:
signals:
void function_name (param1, …, paramN)
✗ Connect signals to slots:
connect (sender, SIGNAL(signal_name()), receiver, SLOT(slot_name()));
✗ Emit a signal:
emit signal_name (param1, …, paramN)
Dragoş Acostăchioaie - http://www.unixinside.org
Signals and slots
Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014
#include <QObject>
class Counter : public QObject
{
Q_OBJECT
public:
Counter() { m_value = 0; }
int value() const { return m_value; }
public slots:
void setValue(int value);
signals:
void valueChanged(int newValue);
private:
int m_value;
};
void Counter::setValue(int value)
{
if (value != m_value) {
m_value = value;
emit valueChanged(value);
}
}
Dragoş Acostăchioaie - http://www.unixinside.org
Template-based container classes
Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014
✗ classes can be used to store items of a specified type
✗ lighter, safer, and easier to use than the STL containers
✗ implicitly shared, they are reentrant, and they are optimized for speed,
low memory consumption, and minimal inline code expansion
✗ thread-safe
✗ two types of iterators - Java-style iterators and STL-style iterators
Dragoş Acostăchioaie - http://www.unixinside.org
Template-based container classes
Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014
✗ QList - stores a list of values of a given type, that can be accessed by index
✗ QLinkedList - similar to QList, except that it uses iterators rather than integer
indexes to access items
✗ QVector - stores an array of values of a given type at adjacent positions in
memory
✗ QStack - subclass of QVector that provides "last in, first out" (LIFO)
✗ QQueue - subclass of QList that provides "first in, first out" (FIFO) semantics
✗ QSet - provides a single-valued mathematical set with fast lookups
✗ QMap - provides a dictionary (associative array) that maps keys to values
✗ QMultiMap - subclass of QMap that provides maps where one key can be
associated with multiple values.
✗ QHash - similar to QMap, but provides significantly faster lookups
✗ QmultiHash - subclass of QHash that provides multi-valued hashes
Dragoş Acostăchioaie - http://www.unixinside.org
QString
Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014
✗ QString – enhance working with strings
✗ built-in Unicode support
✗ lot of useful methods (arguments, concatenation, formatting, splitting,
translation, etc)
✗ cheap copying
Dragoş Acostăchioaie - http://www.unixinside.org
Qt Widgets
Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014
✗ QCheckBox
✗ QComboBox
✗ QDateEdit
✗ QLabel
✗ QLineEdit
✗ QMenu
✗ QProgressBar
✗ QPushButton
✗ QRadioButton
✗ QScrollBar
✗ QSpinBox
✗ QTabWidget
Dragoş Acostăchioaie - http://www.unixinside.org
Qt Advanced Widget Classes
Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014
✗ QColumnView
✗ QListView
✗ QTableView
✗ QTreeView
✗ QDesktopWidget
✗ QCalendarWidget
Dragoş Acostăchioaie - http://www.unixinside.org
Qt Widget Classes
Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014
✗ Abstract Widget Classes (eg Qdialog, QabstractButton, Qframe)
✗ Organizer Widget Classes (eg QgroupBox, Qsplitter, QtabWidget)
✗ Graphics View Classes (eg QgraphicsScene)
✗ Model/View Classes (eg QmodelIndex, QitemSelectionModel)
✗ Main Window and Related Classes (eg QmainWindow, QMenu)
✗ Widget Appearance and Style-Related Classes (eg Qfont, Qstyle)
✗ Layout Classes (eg QboxLayout, QgridLayout, QStackedLayout)
Dragoş Acostăchioaie - http://www.unixinside.org
Download & install Qt
Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014
✗ Online or offline installer
✗ Desktop: Linux, Mac, Windows installers
✗ Windows: Visual Studio and MinGW (included) versions
✗ Mobile: Android, iOS installers
✗ http://qt-project.org/downloads
Dragoş Acostăchioaie - http://www.unixinside.org
Qt Examples. Hello, world!
Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014
#include <QApplication>
#include <QLabel>
int main( int argc, char **argv )
{
QApplication app( argc, argv );
QLabel l( "Hello, world!" );
l.show();
return app.exec();
}
Dragoş Acostăchioaie - http://www.unixinside.org
Qt Examples. A text editor
Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014
✗ use Qt Creator to create a project with the necessary files, but we could
also write all the code ourselves
✗ use Qt Designer to create the user interface
Dragoş Acostăchioaie - http://www.unixinside.org
Qt Examples. A text editor
Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Notepad</class>
<widget class="QMainWindow" name="Notepad">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle">
<string>Notepad</string>
</property>
<widget class="QWidget" name="centralWidget">
<widget class="QWidget" name="">
<property name="geometry">
<rect>
<x>70</x>
<y>0</y>
<width>268</width>
<height>235</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QTextEdit" name="textEdit"/>
</item>
<item>
<widget class="QPushButton" name="quitButton">
<property name="text">
<string>Quit</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
<widget class="QMenuBar" name="menuBar">
...
✗ the user interface is stored in a file using XML
Dragoş Acostăchioaie - http://www.unixinside.org
Qt Examples. A text editor. Main source file
Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014
#include "notepad.h"
#include <QApplication>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
Notepad w;
w.show();
return a.exec();
}
Dragoş Acostăchioaie - http://www.unixinside.org
Qt Examples. A text editor. The header file
Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014
#include <QMainWindow>
namespace Ui {
class Notepad;
}
class Notepad : public QMainWindow
{
Q_OBJECT
public:
Notepad(QWidget *parent = 0);
~Notepad();
private slots:
void on_quitButton_clicked();
private:
Ui::Notepad *ui;
};
✗ the class declaration contains the
Q_OBJECT macro
✗ It must come first in the class
definition
✗ the Q_OBJECT macro declares
our class as a Qobject
✗ the value 0 for parent argument in
calling Notepad constructor means
the widget has no parent (is a top-
level widget)
✗ QtDesigner connects the button's
clicked() signal to a slot in the
Notepad class
✗ we only need to declare a slot
with a name that follows a
standard convention
Dragoş Acostăchioaie - http://www.unixinside.org
Qt Examples. A text editor. The source file
Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014
#include "notepad.h"
#include "ui_notepad.h"
Notepad::Notepad(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::Notepad)
{
ui->setupUi(this);
}
Notepad::~Notepad()
{
delete ui;
}
void Notepad::on_quitButton_clicked()
{
qApp->quit();
}
✗ the header and source files has
been generated by the wizard
✗ the ui_notepad.h file has been
generated by the uic tool
Dragoş Acostăchioaie - http://www.unixinside.org
Qt Examples. A text editor. The source file
Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014
✗ Qt Designer adds the private slots on_actionOpen_triggered() and
on_actionSave_triggered()
✗ we will implement these functions in notepad.h
Dragoş Acostăchioaie - http://www.unixinside.org
Qt Examples. A text editor. The source file
Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014
void Notepad::on_actionOpen_triggered()
{
QString fileName =
QFileDialog::getOpenFileName(this, tr("Open
File"), QString(),
tr("Text Files (*.txt);;C++ Files (*.cpp
*.h)"));
if (!fileName.isEmpty()) {
QFile file(fileName);
if (!file.open(QIODevice::ReadOnly)) {
QMessageBox::critical(this, tr("Error"),
tr("Could not open file"));
return;
}
QTextStream in(&file);
ui->textEdit->setText(in.readAll());
file.close();
}
}
✗ the static getOpenFileName()
function displays a modal file
dialog. It returns the file path of
the file selected, or an empty
string if the user canceled the
dialog
✗ we try to open the file with
open(), which returns true if the
file could be opened
✗ we read the data using the
QTextStream class, which wraps
the QFile object. The readAll()
function returns the contents of
the file as a Qstring
✗ we use the function tr() for
visibile strings to provide
translations
Dragoş Acostăchioaie - http://www.unixinside.org
Qt Examples. A text editor. The source file
Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014
void Notepad::on_actionSave_triggered()
{
QString fileName =
QFileDialog::getSaveFileName(this, tr("Save
File"), QString(),
tr("Text Files (*.txt);;C++ Files (*.cpp
*.h)"));
if (!fileName.isEmpty()) {
QFile file(fileName);
if (!file.open(QIODevice::WriteOnly)) {
// error message
} else {
QTextStream stream(&file);
stream << ui->textEdit->toPlainText();
stream.flush();
file.close();
}
}
}
✗ we write the contents of the text
edit to the file, using the
QTextStream class
✗ QTextStream can also write
QStrings to the file with the <<
operator
Dragoş Acostăchioaie - http://www.unixinside.org
Qt Examples. A text editor. The project file
Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4):
QT += widgets
TARGET = Notepad
TEMPLATE = app
SOURCES += main.cpp
notepad.cpp
HEADERS += notepad.h
FORMS += notepad.ui
✗ the project file specifies: the
application name, the forms,
header and source files used by
the application
✗ the QT argument specifies the
modules used by the application
Dragoş Acostăchioaie - http://www.unixinside.org
Qt Examples. A text editor.
Building and running the project
Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014
✗ build and run the project in QtCreator
✗ we can also use at the command line:
✗ qmake – reads the project file and produces a Makefile with instructions
✗ make (or nmake on Windows)
Dragoş Acostăchioaie - http://www.unixinside.org
Resources
Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014
✗ Qt documentation - http://qt-project.org/doc/
✗ Mark Summerfield books - http://www.qtrac.eu/marksummerfield.html
✗ Learning Qt videos - https://www.ics.com/learning/icsnetwork

More Related Content

What's hot

Docker Swarm Introduction
Docker Swarm IntroductionDocker Swarm Introduction
Docker Swarm Introductionrajdeep
 
Modern CI/CD Pipeline Using Azure DevOps
Modern CI/CD Pipeline Using Azure DevOpsModern CI/CD Pipeline Using Azure DevOps
Modern CI/CD Pipeline Using Azure DevOpsGlobalLogic Ukraine
 
Build, Publish, Deploy and Test Docker images and containers with Jenkins Wor...
Build, Publish, Deploy and Test Docker images and containers with Jenkins Wor...Build, Publish, Deploy and Test Docker images and containers with Jenkins Wor...
Build, Publish, Deploy and Test Docker images and containers with Jenkins Wor...Docker, Inc.
 
Introduction to Powershell Version 5
Introduction to Powershell Version 5Introduction to Powershell Version 5
Introduction to Powershell Version 5Nishtha Kesarwani
 
virtualization-vs-containerization-paas
virtualization-vs-containerization-paasvirtualization-vs-containerization-paas
virtualization-vs-containerization-paasrajdeep
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker IntroductionPeng Xiao
 
Native mobile application development with Flutter (Dart)
Native mobile application development with Flutter (Dart)Native mobile application development with Flutter (Dart)
Native mobile application development with Flutter (Dart)Randal Schwartz
 
Docker 101 - High level introduction to docker
Docker 101 - High level introduction to dockerDocker 101 - High level introduction to docker
Docker 101 - High level introduction to dockerDr Ganesh Iyer
 
SpringOne Tour: Spring Boot 3 and Beyond
SpringOne Tour: Spring Boot 3 and BeyondSpringOne Tour: Spring Boot 3 and Beyond
SpringOne Tour: Spring Boot 3 and BeyondVMware Tanzu
 
QThreads: Are You Using Them Wrong?
QThreads: Are You Using Them Wrong? QThreads: Are You Using Them Wrong?
QThreads: Are You Using Them Wrong? ICS
 
Qt 入門就上手 !!
Qt 入門就上手 !!Qt 入門就上手 !!
Qt 入門就上手 !!輝亮 游
 
Software Development Best Practices: Separating UI from Business Logic
Software Development Best Practices: Separating UI from Business LogicSoftware Development Best Practices: Separating UI from Business Logic
Software Development Best Practices: Separating UI from Business LogicICS
 
Docker introduction
Docker introductionDocker introduction
Docker introductionPhuc Nguyen
 
Kubernetes Architecture
 Kubernetes Architecture Kubernetes Architecture
Kubernetes ArchitectureKnoldus Inc.
 
Platform Engineering
Platform EngineeringPlatform Engineering
Platform EngineeringOpsta
 
Docker and the Linux Kernel
Docker and the Linux KernelDocker and the Linux Kernel
Docker and the Linux KernelDocker, Inc.
 

What's hot (20)

Docker Swarm Introduction
Docker Swarm IntroductionDocker Swarm Introduction
Docker Swarm Introduction
 
Modern CI/CD Pipeline Using Azure DevOps
Modern CI/CD Pipeline Using Azure DevOpsModern CI/CD Pipeline Using Azure DevOps
Modern CI/CD Pipeline Using Azure DevOps
 
Build, Publish, Deploy and Test Docker images and containers with Jenkins Wor...
Build, Publish, Deploy and Test Docker images and containers with Jenkins Wor...Build, Publish, Deploy and Test Docker images and containers with Jenkins Wor...
Build, Publish, Deploy and Test Docker images and containers with Jenkins Wor...
 
Introduction to Powershell Version 5
Introduction to Powershell Version 5Introduction to Powershell Version 5
Introduction to Powershell Version 5
 
virtualization-vs-containerization-paas
virtualization-vs-containerization-paasvirtualization-vs-containerization-paas
virtualization-vs-containerization-paas
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
Native mobile application development with Flutter (Dart)
Native mobile application development with Flutter (Dart)Native mobile application development with Flutter (Dart)
Native mobile application development with Flutter (Dart)
 
Docker 101 - High level introduction to docker
Docker 101 - High level introduction to dockerDocker 101 - High level introduction to docker
Docker 101 - High level introduction to docker
 
SpringOne Tour: Spring Boot 3 and Beyond
SpringOne Tour: Spring Boot 3 and BeyondSpringOne Tour: Spring Boot 3 and Beyond
SpringOne Tour: Spring Boot 3 and Beyond
 
QThreads: Are You Using Them Wrong?
QThreads: Are You Using Them Wrong? QThreads: Are You Using Them Wrong?
QThreads: Are You Using Them Wrong?
 
Kubernetes Basics
Kubernetes BasicsKubernetes Basics
Kubernetes Basics
 
Qt 入門就上手 !!
Qt 入門就上手 !!Qt 入門就上手 !!
Qt 入門就上手 !!
 
Software Development Best Practices: Separating UI from Business Logic
Software Development Best Practices: Separating UI from Business LogicSoftware Development Best Practices: Separating UI from Business Logic
Software Development Best Practices: Separating UI from Business Logic
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
 
Kubernetes Architecture
 Kubernetes Architecture Kubernetes Architecture
Kubernetes Architecture
 
Platform Engineering
Platform EngineeringPlatform Engineering
Platform Engineering
 
Gitlab ci-cd
Gitlab ci-cdGitlab ci-cd
Gitlab ci-cd
 
Docker and the Linux Kernel
Docker and the Linux KernelDocker and the Linux Kernel
Docker and the Linux Kernel
 
Migrating from MFC to Qt
Migrating from MFC to QtMigrating from MFC to Qt
Migrating from MFC to Qt
 

Viewers also liked

Intro to gui, cross platform and qt
Intro to gui, cross platform and qtIntro to gui, cross platform and qt
Intro to gui, cross platform and qtMuhammad Sabry
 
GUI_using_QT_Designer_PyQT4
GUI_using_QT_Designer_PyQT4GUI_using_QT_Designer_PyQT4
GUI_using_QT_Designer_PyQT4zenonas
 
Qt App Development - Cross-Platform Development for Android, iOS, Windows Pho...
Qt App Development - Cross-Platform Development for Android, iOS, Windows Pho...Qt App Development - Cross-Platform Development for Android, iOS, Windows Pho...
Qt App Development - Cross-Platform Development for Android, iOS, Windows Pho...Andreas Jakl
 
박진호 - 우분투 부팅 과정에 대한 이야기 (2012Y07M28D)
박진호 - 우분투 부팅 과정에 대한 이야기 (2012Y07M28D)박진호 - 우분투 부팅 과정에 대한 이야기 (2012Y07M28D)
박진호 - 우분투 부팅 과정에 대한 이야기 (2012Y07M28D)Ubuntu Korea Community
 
Qt5 (minimal) on beaglebone, with Yocto
Qt5 (minimal) on beaglebone, with YoctoQt5 (minimal) on beaglebone, with Yocto
Qt5 (minimal) on beaglebone, with YoctoPrabindh Sundareson
 
Cross platform solutions for Mobile App Development
Cross platform solutions for Mobile App Development Cross platform solutions for Mobile App Development
Cross platform solutions for Mobile App Development USAID CEED II Project Moldova
 
Cross platform development
Cross platform developmentCross platform development
Cross platform developmentdftaiwo
 
Qt Application Development on Harmattan
Qt Application Development on HarmattanQt Application Development on Harmattan
Qt Application Development on HarmattanVille Lavonius
 
The Mobile Market and Qt
The Mobile Market and QtThe Mobile Market and Qt
The Mobile Market and QtEspen Riskedal
 
Qt Development Tools
Qt Development ToolsQt Development Tools
Qt Development ToolsWilliam Lee
 
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
 
Go & multi platform GUI Trials and Errors
Go & multi platform GUI Trials and ErrorsGo & multi platform GUI Trials and Errors
Go & multi platform GUI Trials and ErrorsYoshiki Shibukawa
 
Qt Tutorial - Part 1
Qt Tutorial - Part 1Qt Tutorial - Part 1
Qt Tutorial - Part 1rmitc
 
Cross platform mobile app development tools review
Cross platform mobile app development tools reviewCross platform mobile app development tools review
Cross platform mobile app development tools reviewUday Kothari
 
A Brief Introduction to the Qt Application Framework
A Brief Introduction to the Qt Application FrameworkA Brief Introduction to the Qt Application Framework
A Brief Introduction to the Qt Application FrameworkZachary Blair
 
Qt Technical Presentation
Qt Technical PresentationQt Technical Presentation
Qt Technical PresentationDaniel Rocha
 
"How to Develop with Qt for Multiple Screen Resolutions and Increase Your Use...
"How to Develop with Qt for Multiple Screen Resolutions and Increase Your Use..."How to Develop with Qt for Multiple Screen Resolutions and Increase Your Use...
"How to Develop with Qt for Multiple Screen Resolutions and Increase Your Use...FELGO SDK
 
How to Make Your Qt App Look Native
How to Make Your Qt App Look NativeHow to Make Your Qt App Look Native
How to Make Your Qt App Look Nativeaccount inactive
 

Viewers also liked (20)

Qt Application Development
Qt Application DevelopmentQt Application Development
Qt Application Development
 
Intro to gui, cross platform and qt
Intro to gui, cross platform and qtIntro to gui, cross platform and qt
Intro to gui, cross platform and qt
 
GUI_using_QT_Designer_PyQT4
GUI_using_QT_Designer_PyQT4GUI_using_QT_Designer_PyQT4
GUI_using_QT_Designer_PyQT4
 
Qt App Development - Cross-Platform Development for Android, iOS, Windows Pho...
Qt App Development - Cross-Platform Development for Android, iOS, Windows Pho...Qt App Development - Cross-Platform Development for Android, iOS, Windows Pho...
Qt App Development - Cross-Platform Development for Android, iOS, Windows Pho...
 
박진호 - 우분투 부팅 과정에 대한 이야기 (2012Y07M28D)
박진호 - 우분투 부팅 과정에 대한 이야기 (2012Y07M28D)박진호 - 우분투 부팅 과정에 대한 이야기 (2012Y07M28D)
박진호 - 우분투 부팅 과정에 대한 이야기 (2012Y07M28D)
 
Qt5 on ti processors
Qt5 on ti processorsQt5 on ti processors
Qt5 on ti processors
 
Qt5 (minimal) on beaglebone, with Yocto
Qt5 (minimal) on beaglebone, with YoctoQt5 (minimal) on beaglebone, with Yocto
Qt5 (minimal) on beaglebone, with Yocto
 
Cross platform solutions for Mobile App Development
Cross platform solutions for Mobile App Development Cross platform solutions for Mobile App Development
Cross platform solutions for Mobile App Development
 
Cross platform development
Cross platform developmentCross platform development
Cross platform development
 
Qt Application Development on Harmattan
Qt Application Development on HarmattanQt Application Development on Harmattan
Qt Application Development on Harmattan
 
The Mobile Market and Qt
The Mobile Market and QtThe Mobile Market and Qt
The Mobile Market and Qt
 
Qt Development Tools
Qt Development ToolsQt Development Tools
Qt Development Tools
 
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
 
Go & multi platform GUI Trials and Errors
Go & multi platform GUI Trials and ErrorsGo & multi platform GUI Trials and Errors
Go & multi platform GUI Trials and Errors
 
Qt Tutorial - Part 1
Qt Tutorial - Part 1Qt Tutorial - Part 1
Qt Tutorial - Part 1
 
Cross platform mobile app development tools review
Cross platform mobile app development tools reviewCross platform mobile app development tools review
Cross platform mobile app development tools review
 
A Brief Introduction to the Qt Application Framework
A Brief Introduction to the Qt Application FrameworkA Brief Introduction to the Qt Application Framework
A Brief Introduction to the Qt Application Framework
 
Qt Technical Presentation
Qt Technical PresentationQt Technical Presentation
Qt Technical Presentation
 
"How to Develop with Qt for Multiple Screen Resolutions and Increase Your Use...
"How to Develop with Qt for Multiple Screen Resolutions and Increase Your Use..."How to Develop with Qt for Multiple Screen Resolutions and Increase Your Use...
"How to Develop with Qt for Multiple Screen Resolutions and Increase Your Use...
 
How to Make Your Qt App Look Native
How to Make Your Qt App Look NativeHow to Make Your Qt App Look Native
How to Make Your Qt App Look Native
 

Similar to Introduction to Qt programming

Qt S60 Technical Presentation Fn Stripped
Qt S60 Technical Presentation Fn StrippedQt S60 Technical Presentation Fn Stripped
Qt S60 Technical Presentation Fn StrippedNokia
 
Mobility and federation of Cloud computing
Mobility and federation of Cloud computingMobility and federation of Cloud computing
Mobility and federation of Cloud computingDavid Wallom
 
Amruth_Kumar_Juturu_Resume
Amruth_Kumar_Juturu_ResumeAmruth_Kumar_Juturu_Resume
Amruth_Kumar_Juturu_ResumeAmruth Kumar
 
Containers Anywhere with OpenShift by Red Hat
Containers Anywhere with OpenShift by Red HatContainers Anywhere with OpenShift by Red Hat
Containers Anywhere with OpenShift by Red HatAmazon Web Services
 
OCCIware, an extensible, standard-based XaaS consumer platform to manage ever...
OCCIware, an extensible, standard-based XaaS consumer platform to manage ever...OCCIware, an extensible, standard-based XaaS consumer platform to manage ever...
OCCIware, an extensible, standard-based XaaS consumer platform to manage ever...OCCIware
 
OCCIware: Extensible and Standard-based XaaS Platform To Manage Everything in...
OCCIware: Extensible and Standard-based XaaS Platform To Manage Everything in...OCCIware: Extensible and Standard-based XaaS Platform To Manage Everything in...
OCCIware: Extensible and Standard-based XaaS Platform To Manage Everything in...OW2
 
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
 
Presentation of OCCIware, a standard, extensible Cloud consumer platform at P...
Presentation of OCCIware, a standard, extensible Cloud consumer platform at P...Presentation of OCCIware, a standard, extensible Cloud consumer platform at P...
Presentation of OCCIware, a standard, extensible Cloud consumer platform at P...OCCIware
 
OCCIware @ Paris Open Source Summit 2017 - a standard, extensible Cloud consu...
OCCIware @ Paris Open Source Summit 2017 - a standard, extensible Cloud consu...OCCIware @ Paris Open Source Summit 2017 - a standard, extensible Cloud consu...
OCCIware @ Paris Open Source Summit 2017 - a standard, extensible Cloud consu...Marc Dutoo
 
OCCIware@POSS 2016 - an extensible, standard XaaS cloud consumer platform
OCCIware@POSS 2016 - an extensible, standard XaaS cloud consumer platformOCCIware@POSS 2016 - an extensible, standard XaaS cloud consumer platform
OCCIware@POSS 2016 - an extensible, standard XaaS cloud consumer platformMarc Dutoo
 
Red hat's updates on the cloud & infrastructure strategy
Red hat's updates on the cloud & infrastructure strategyRed hat's updates on the cloud & infrastructure strategy
Red hat's updates on the cloud & infrastructure strategyOrgad Kimchi
 
Au delà des brokers, un tour de l’environnement Kafka | Florent Ramière
Au delà des brokers, un tour de l’environnement Kafka | Florent RamièreAu delà des brokers, un tour de l’environnement Kafka | Florent Ramière
Au delà des brokers, un tour de l’environnement Kafka | Florent Ramièreconfluent
 
Andreas Jakl Software Development on Nokia Deviceswith Qt
Andreas Jakl Software Development on Nokia Deviceswith QtAndreas Jakl Software Development on Nokia Deviceswith Qt
Andreas Jakl Software Development on Nokia Deviceswith QtNokiaAppForum
 
Scaling AI/ML with Containers and Kubernetes
Scaling AI/ML with Containers and Kubernetes Scaling AI/ML with Containers and Kubernetes
Scaling AI/ML with Containers and Kubernetes Tushar Katarki
 

Similar to Introduction to Qt programming (20)

Qt S60 Technical Presentation Fn Stripped
Qt S60 Technical Presentation Fn StrippedQt S60 Technical Presentation Fn Stripped
Qt S60 Technical Presentation Fn Stripped
 
Qt for S60
Qt for S60Qt for S60
Qt for S60
 
Treinamento Qt básico - aula I
Treinamento Qt básico - aula ITreinamento Qt básico - aula I
Treinamento Qt básico - aula I
 
Mobility and federation of Cloud computing
Mobility and federation of Cloud computingMobility and federation of Cloud computing
Mobility and federation of Cloud computing
 
Amruth_Kumar_Juturu_Resume
Amruth_Kumar_Juturu_ResumeAmruth_Kumar_Juturu_Resume
Amruth_Kumar_Juturu_Resume
 
NextGenML
NextGenML NextGenML
NextGenML
 
Containers Anywhere with OpenShift by Red Hat
Containers Anywhere with OpenShift by Red HatContainers Anywhere with OpenShift by Red Hat
Containers Anywhere with OpenShift by Red Hat
 
OCCIware, an extensible, standard-based XaaS consumer platform to manage ever...
OCCIware, an extensible, standard-based XaaS consumer platform to manage ever...OCCIware, an extensible, standard-based XaaS consumer platform to manage ever...
OCCIware, an extensible, standard-based XaaS consumer platform to manage ever...
 
OCCIware: Extensible and Standard-based XaaS Platform To Manage Everything in...
OCCIware: Extensible and Standard-based XaaS Platform To Manage Everything in...OCCIware: Extensible and Standard-based XaaS Platform To Manage Everything in...
OCCIware: Extensible and Standard-based XaaS Platform To Manage Everything in...
 
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
 
Presentation of OCCIware, a standard, extensible Cloud consumer platform at P...
Presentation of OCCIware, a standard, extensible Cloud consumer platform at P...Presentation of OCCIware, a standard, extensible Cloud consumer platform at P...
Presentation of OCCIware, a standard, extensible Cloud consumer platform at P...
 
OCCIware @ Paris Open Source Summit 2017 - a standard, extensible Cloud consu...
OCCIware @ Paris Open Source Summit 2017 - a standard, extensible Cloud consu...OCCIware @ Paris Open Source Summit 2017 - a standard, extensible Cloud consu...
OCCIware @ Paris Open Source Summit 2017 - a standard, extensible Cloud consu...
 
了解 Qt
了解 Qt了解 Qt
了解 Qt
 
Qt
QtQt
Qt
 
OCCIware@POSS 2016 - an extensible, standard XaaS cloud consumer platform
OCCIware@POSS 2016 - an extensible, standard XaaS cloud consumer platformOCCIware@POSS 2016 - an extensible, standard XaaS cloud consumer platform
OCCIware@POSS 2016 - an extensible, standard XaaS cloud consumer platform
 
Red hat's updates on the cloud & infrastructure strategy
Red hat's updates on the cloud & infrastructure strategyRed hat's updates on the cloud & infrastructure strategy
Red hat's updates on the cloud & infrastructure strategy
 
Au delà des brokers, un tour de l’environnement Kafka | Florent Ramière
Au delà des brokers, un tour de l’environnement Kafka | Florent RamièreAu delà des brokers, un tour de l’environnement Kafka | Florent Ramière
Au delà des brokers, un tour de l’environnement Kafka | Florent Ramière
 
Andreas Jakl Software Development on Nokia Deviceswith Qt
Andreas Jakl Software Development on Nokia Deviceswith QtAndreas Jakl Software Development on Nokia Deviceswith Qt
Andreas Jakl Software Development on Nokia Deviceswith Qt
 
Scaling AI/ML with Containers and Kubernetes
Scaling AI/ML with Containers and Kubernetes Scaling AI/ML with Containers and Kubernetes
Scaling AI/ML with Containers and Kubernetes
 
Meet Qt
Meet QtMeet Qt
Meet Qt
 

More from Dragos Tudor Acostachioaie (14)

Ce mai este nou in open-source si nu numai
Ce mai este nou in open-source si nu numaiCe mai este nou in open-source si nu numai
Ce mai este nou in open-source si nu numai
 
Realizarea unui cloud privat cu tehnologii open-source
Realizarea unui cloud privat cu tehnologii open-sourceRealizarea unui cloud privat cu tehnologii open-source
Realizarea unui cloud privat cu tehnologii open-source
 
Realizarea de aplicatii pentru Android utilizand Qt
Realizarea de aplicatii pentru Android utilizand QtRealizarea de aplicatii pentru Android utilizand Qt
Realizarea de aplicatii pentru Android utilizand Qt
 
Linux distributions. Ubuntu Server
Linux distributions. Ubuntu ServerLinux distributions. Ubuntu Server
Linux distributions. Ubuntu Server
 
Mediul de programare multiplatforma Qt
Mediul de programare multiplatforma QtMediul de programare multiplatforma Qt
Mediul de programare multiplatforma Qt
 
Dela e-mail la Social Web
Dela e-mail la Social WebDela e-mail la Social Web
Dela e-mail la Social Web
 
Imbunatatirea securitatii sistemelor Linux cu ajutorul grsecurity
Imbunatatirea securitatii sistemelor Linux cu ajutorul grsecurityImbunatatirea securitatii sistemelor Linux cu ajutorul grsecurity
Imbunatatirea securitatii sistemelor Linux cu ajutorul grsecurity
 
Remember
RememberRemember
Remember
 
Moodle patru ani de ectivitate în învăţământul
Moodle   patru ani de ectivitate în învăţământulMoodle   patru ani de ectivitate în învăţământul
Moodle patru ani de ectivitate în învăţământul
 
Programarea independenta de platforma in C++. Qt
Programarea independenta de platforma in C++. QtProgramarea independenta de platforma in C++. Qt
Programarea independenta de platforma in C++. Qt
 
Qt detaliu
Qt detaliuQt detaliu
Qt detaliu
 
Introducere in Flex si AIR
Introducere in Flex si AIRIntroducere in Flex si AIR
Introducere in Flex si AIR
 
Razboiul din fiecare birou
Razboiul din fiecare birouRazboiul din fiecare birou
Razboiul din fiecare birou
 
Linux ca platforma pentru dezvoltare
Linux ca platforma pentru dezvoltareLinux ca platforma pentru dezvoltare
Linux ca platforma pentru dezvoltare
 

Recently uploaded

Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 

Recently uploaded (20)

Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 

Introduction to Qt programming

  • 1. Introduction to Qt programming Dragoş Acostăchioaie http://www.unixinside.org dragos@unixinside.org Şcoala de vară “Informatică la castel”, Macea, 25 -31 august 2014
  • 2. Dragoş Acostăchioaie - http://www.unixinside.org Qt. Code less. Create more. Deploy everywhere ✗ Qt - cross-platform application and User Interface framework ✗ supports a lot of hardware and software platforms: desktop, mobile and embedded ✗ no need to rewrite the source code Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014
  • 3. Dragoş Acostăchioaie - http://www.unixinside.org Qt. Code less. Create more. Deploy everywhere Desktop platforms: ✗ Linux/X11, other UNIX flavours (eg FreeBSD, Solaris, HP-UX, AIX) ✗ Linux/Wayland ✗ Mac OS ✗ Windows Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014
  • 4. Dragoş Acostăchioaie - http://www.unixinside.org Qt. Code less. Create more. Deploy everywhere Mobile platforms: ✗ Android ✗ iOS ✗ BlackBerry Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014
  • 5. Dragoş Acostăchioaie - http://www.unixinside.org Qt. Code less. Create more. Deploy everywhere ✗ Embedded platforms: ✗ Embedded Android ✗ Embedded Linux ✗ Windows Embedded, Windows CE, WinRT ✗ Real-time operating systems (eg QNX, VxWorks) Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014
  • 6. Dragoş Acostăchioaie - http://www.unixinside.org Qt. Code less. Create more. Deploy everywhere ✗ can interact with other languages (language bindings): Java (QtJambi), Ruby, C#, C++11 ✗ scripting languages supported: QML (native), JavaScript, Phyton Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014
  • 7. Dragoş Acostăchioaie - http://www.unixinside.org Qt. Code less. Create more. Deploy everywhere IDEs supported: ✗ Qt Creator ✗ Eclipse ✗ Microsoft Visual Studio Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014
  • 8. Dragoş Acostăchioaie - http://www.unixinside.org Qt. Code less. Create more. Deploy everywhere Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014 ✗ Write once, run everywhere - the same source code runs without changes on different platforms (see also the porting paradigm of FLOSS solutions) ✗ Superior performances than languages running in a virtual machine (eg Java) – the binary code is executed natively, resulting a much less resource consumption ✗ Uses the natively graphic system of the operating system – the applications have the aspect and behaviour of the host system ✗ Porting from an operating system to another does not require source code changes – just compile on the host platform (if no specific functionalities or libraries has been used) ✗ Ensure the source code against future host platform changes – at source or binary level; the developers can focus on application development, not on API changes ✗ Different markets can be easily achieved – developers can target multiple OSes ✗ Less source code maintenance costs
  • 9. Dragoş Acostăchioaie - http://www.unixinside.org Qt5 Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014 First Qt5 version launched in 2012
  • 10. Dragoş Acostăchioaie - http://www.unixinside.org Qt5 Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014 ✗ Modular – increase cross-platform portability ✗ Qt Essentials ✗ Qt Add-Ons ✗ Qt Tools ✗ Consolidation of Qt Platform Abstraction
  • 11. Dragoş Acostăchioaie - http://www.unixinside.org Qt5 Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014 Compatible with Qt 4
  • 12. Dragoş Acostăchioaie - http://www.unixinside.org Qt5 – A modular architecture Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014 Essentials ✗ Qt Core - provides core non-GUI functionality ✗ Qt GUI - provides the basic enablers for graphical applications ✗ Qt Multimedia - provides audio, video, radio and camera functionality ✗ Qt Network - provides classes to make network programming easier and portable ✗ Qt QML - classes for QML and JavaScript languages ✗ Qt Quick - provides classes for embedding Qt Quick2 in Qt/C++ applications ✗ Qt SQL - provides a driver layer, SQL API layer, and a user interface layer for SQL db ✗ Qt Test - classes for unit testing Qt applications and libraries ✗ Qt WebKit - provides a web browser engine (WebKit2) ✗ Qt Widgets - extends Qt GUI with C++ widget functionality
  • 13. Dragoş Acostăchioaie - http://www.unixinside.org Qt5 – A modular architecture Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014 Add-ons ✗ Qt Bluetooth – enables basic Bluetooth operations ✗ Qt D-Bus - Inter-Process Communication using the D-Bus protocol (UNIX-only) ✗ Qt Graphical Effects - graphical effects for use with Qt Quick 2 ✗ Qt Image Formats - plugins for additional image formats ✗ Qt OpenGL - offers classes that make it easy to use OpenGL ✗ Qt Positioning - provides positioning information ✗ Qt Print Support - provides classes to make printing easier and portable ✗ Qt Sensors - Provides classes for reading sensor data ✗ Qt Serial Port - classes that enable access to a serial port ✗ Qt Script - provides classes for making Qt applications scriptable ✗ Qt Script Tools ✗ Qt SVG - provides functionality for handling SVG images ✗ Qt XML - implementations of SAX and DOM ✗ Qt XML Patterns - support for XPath, XQuery, XSLT and XML schema validation
  • 14. Dragoş Acostăchioaie - http://www.unixinside.org Qt5 – A modular architecture Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014 Tools ✗ Qt Designer – classes for extending Qt Designer ✗ Qt Help - classes for integrating online documentation into applications ✗ Qt UI Tools - classes to handle the forms created in Qt Designer
  • 15. Dragoş Acostăchioaie - http://www.unixinside.org Qt5 – A modular architecture Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014 Future releases may include more modules
  • 16. Dragoş Acostăchioaie - http://www.unixinside.org What's new in Qt5 Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014 ✗✗ Efficient alternative to classical object communication (event listeners) ✗ Slots are member functions of the classes (inherited from Qobject), which are called as answer for a specific signal ✗ There a pre-defined set of signals and slots ✗ A signal can be connected to multiple slots ✗ A slot can be connected to multiple signals ✗ A signal can be connected to another signal ✗ A signal is emmited when an event occurs ✗ production-ready ports for Android and iOS (since Qt 5.2) ✗ increase the graphic perfomances (OpenGL) up to 200%, due to architectural changes ✗ better integration of Qt Quick and QML ✗ new features in Qt Quick: ✗ Canvas for drawing. Canvas provides an API that is similar to the HTML5 Canvas API, along with some additional features ✗ Shader Effects which enable GLSL shader programs to be integrated directly into QML code and applied to items and images ✗ Particle Effects for creating a variety of 2D particle systems ✗ Sprites can be used in animating 2D graphical objects and as a source for particle system
  • 17. Dragoş Acostăchioaie - http://www.unixinside.org What's new in Qt5 Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014 ✗ new features in Qt Quick (continued): ✗ Offline storage is a JavaScript API that conforms with the HTML5 Web Database API for storing data in Qt Quick applications ✗ Window provides a top-level window and the Screen type for accessing a screen's resolution and other details. This is useful for desktop applications developed using Qt Quick ✗ OpenGL-based rendering architecture for optimal performance
  • 18. Dragoş Acostăchioaie - http://www.unixinside.org What's new in Qt5 Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014 ✗ Qt Quick does reduce the effort considerably compared to the traditional native (C or C++) approach, but the new Qt Quick Controls and Qt Quick Layouts take it a step further. These new modules provide ready-to-use UI controls and layouts to enable faster application development and with less code ✗ Qt Quick Controls and Qt Quick Layouts provide a vast set of UI controls ranging from the most basic TextField and Button to the more complex TableView and TabView. These controls are also made available in Qt Quick Designer ✗ the new QtSensors and QtPositioning modules ✗ improved support for JavaScript and QML in Qt 5, while still having the C++ foundation and Qt Widget support. The JavaScript backend is powered by V8 and Qt WebKit 2 have full HTML5 support
  • 19. Dragoş Acostăchioaie - http://www.unixinside.org What's new in Qt5 Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014 ✗ Qt Multimedia provides a rich set of QML types and C++ classes to handle multimedia content. It also provides necessary APIs to access the camera and radio functionality. Qt 5 brings the Qt Multimedia module into the set of essential modules with support on all major platforms ✗ platform-specific extras (Qt Android Extras, Qt Mac Extras, Qt Windows Extras, Qt X11 Extras) ✗ Qt 5 splits the Qt libraries into domain specific libraries and modules. This means that an application can choose which libraries it requires and only compile, use and deploy those ✗ the Qt Widgets have been separated into their own module in Qt 5, the Qt Widgets module. It is part of the essential modules. ✗ the windowing system dependent parts of Qt have been completely rewritten for Qt 5, based on the Qt Platform Abstraction, a plugin architecture which allows Qt to dynamically load a windowing system integration based on what system it is running on.
  • 20. Dragoş Acostăchioaie - http://www.unixinside.org What's new in Qt5 Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014 ✗ Conectivity and networking improvements: ✗ provides better support for IPv6 and dual mode networks ✗ provides better ways to handle TCP socket-based connections and SSL certificates ✗ the opaque Private Keys support in Qt 5 enables applications to read private keys from devices such as PKCS#11 dongles for stricter client authentication ✗ the new Qt Bluetooth and Qt NFC new modules
  • 21. Dragoş Acostăchioaie - http://www.unixinside.org What's new in Qt5 Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014 ✗ JSON support: ✗ Qt applications that use simple data structures to store small amount of data, can now choose to use JSON documents over the complex database backends that need necessary drivers or plugins to access data ✗ the Qt Core provides a set of classes to enable parsing and generating JSON documents. These classes also allow you to convert between an in-memory binary representation of JSON to a standard textual JSON format.
  • 22. Dragoş Acostăchioaie - http://www.unixinside.org What's new in Qt5 Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014 ✗ Qt 5 extends the multi-point touch input support to include Qt Quick, covering all the information about the touch points, including the touch position, pressure, and velocity ✗ the mouse event handling in Qt 5 has been improved from its predecessor. Applications have more control to handle mouse events in Qt Quick. The mouse area in a QML document can propagate the mouse wheel and click events and also ignore propagated events ✗ support for more mouse buttons on platforms where this is supported. This comes in handy for gaming applications developed using Qt
  • 23. Dragoş Acostăchioaie - http://www.unixinside.org QtWidget Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014 ✗✗ Efficient alternative to classical object communication (event listeners) ✗ Slots are member functions of the classes (inherited from Qobject), which are called as answer for a specific signal ✗ There a pre-defined set of signals and slots ✗ A signal can be connected to multiple slots ✗ A slot can be connected to multiple signals ✗ A signal can be connected to another signal ✗ A signal is emmited when an event occurs ✗ QtWidget - the base class of all user interface objects ✗ the atom of the user interface - it receives mouse, keyboard and other events from the window system, and paints a representation of itself on the screen ✗ every widget is rectangular ✗ a widget without a parent widget is always an independent window (top- level widget) ✗ non-window widgets are child widgets, displayed within their parent widgets ✗ most widgets in Qt are mainly useful as child widgets
  • 24. Dragoş Acostăchioaie - http://www.unixinside.org Signals and slots Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014
  • 25. Dragoş Acostăchioaie - http://www.unixinside.org Signals and slots Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014 ✗ Efficient alternative to classical object communication (event listeners) ✗ Slots are member functions of the classes (inherited from Qobject), which are called as answer for a specific signal ✗ There a pre-defined set of signals and slots ✗ A signal can be connected to multiple slots ✗ A slot can be connected to multiple signals ✗ A signal can be connected to another signal ✗ A signal is emmited when an event occurs
  • 26. Dragoş Acostăchioaie - http://www.unixinside.org Signals and slots Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014 ✗ Declaration of slots: [ access_type ] slots: [ return_type ] function_name (param1, …, paramN) ✗ Declaration of signals: signals: void function_name (param1, …, paramN) ✗ Connect signals to slots: connect (sender, SIGNAL(signal_name()), receiver, SLOT(slot_name())); ✗ Emit a signal: emit signal_name (param1, …, paramN)
  • 27. Dragoş Acostăchioaie - http://www.unixinside.org Signals and slots Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014 #include <QObject> class Counter : public QObject { Q_OBJECT public: Counter() { m_value = 0; } int value() const { return m_value; } public slots: void setValue(int value); signals: void valueChanged(int newValue); private: int m_value; }; void Counter::setValue(int value) { if (value != m_value) { m_value = value; emit valueChanged(value); } }
  • 28. Dragoş Acostăchioaie - http://www.unixinside.org Template-based container classes Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014 ✗ classes can be used to store items of a specified type ✗ lighter, safer, and easier to use than the STL containers ✗ implicitly shared, they are reentrant, and they are optimized for speed, low memory consumption, and minimal inline code expansion ✗ thread-safe ✗ two types of iterators - Java-style iterators and STL-style iterators
  • 29. Dragoş Acostăchioaie - http://www.unixinside.org Template-based container classes Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014 ✗ QList - stores a list of values of a given type, that can be accessed by index ✗ QLinkedList - similar to QList, except that it uses iterators rather than integer indexes to access items ✗ QVector - stores an array of values of a given type at adjacent positions in memory ✗ QStack - subclass of QVector that provides "last in, first out" (LIFO) ✗ QQueue - subclass of QList that provides "first in, first out" (FIFO) semantics ✗ QSet - provides a single-valued mathematical set with fast lookups ✗ QMap - provides a dictionary (associative array) that maps keys to values ✗ QMultiMap - subclass of QMap that provides maps where one key can be associated with multiple values. ✗ QHash - similar to QMap, but provides significantly faster lookups ✗ QmultiHash - subclass of QHash that provides multi-valued hashes
  • 30. Dragoş Acostăchioaie - http://www.unixinside.org QString Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014 ✗ QString – enhance working with strings ✗ built-in Unicode support ✗ lot of useful methods (arguments, concatenation, formatting, splitting, translation, etc) ✗ cheap copying
  • 31. Dragoş Acostăchioaie - http://www.unixinside.org Qt Widgets Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014 ✗ QCheckBox ✗ QComboBox ✗ QDateEdit ✗ QLabel ✗ QLineEdit ✗ QMenu ✗ QProgressBar ✗ QPushButton ✗ QRadioButton ✗ QScrollBar ✗ QSpinBox ✗ QTabWidget
  • 32. Dragoş Acostăchioaie - http://www.unixinside.org Qt Advanced Widget Classes Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014 ✗ QColumnView ✗ QListView ✗ QTableView ✗ QTreeView ✗ QDesktopWidget ✗ QCalendarWidget
  • 33. Dragoş Acostăchioaie - http://www.unixinside.org Qt Widget Classes Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014 ✗ Abstract Widget Classes (eg Qdialog, QabstractButton, Qframe) ✗ Organizer Widget Classes (eg QgroupBox, Qsplitter, QtabWidget) ✗ Graphics View Classes (eg QgraphicsScene) ✗ Model/View Classes (eg QmodelIndex, QitemSelectionModel) ✗ Main Window and Related Classes (eg QmainWindow, QMenu) ✗ Widget Appearance and Style-Related Classes (eg Qfont, Qstyle) ✗ Layout Classes (eg QboxLayout, QgridLayout, QStackedLayout)
  • 34. Dragoş Acostăchioaie - http://www.unixinside.org Download & install Qt Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014 ✗ Online or offline installer ✗ Desktop: Linux, Mac, Windows installers ✗ Windows: Visual Studio and MinGW (included) versions ✗ Mobile: Android, iOS installers ✗ http://qt-project.org/downloads
  • 35. Dragoş Acostăchioaie - http://www.unixinside.org Qt Examples. Hello, world! Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014 #include <QApplication> #include <QLabel> int main( int argc, char **argv ) { QApplication app( argc, argv ); QLabel l( "Hello, world!" ); l.show(); return app.exec(); }
  • 36. Dragoş Acostăchioaie - http://www.unixinside.org Qt Examples. A text editor Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014 ✗ use Qt Creator to create a project with the necessary files, but we could also write all the code ourselves ✗ use Qt Designer to create the user interface
  • 37. Dragoş Acostăchioaie - http://www.unixinside.org Qt Examples. A text editor Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014 <?xml version="1.0" encoding="UTF-8"?> <ui version="4.0"> <class>Notepad</class> <widget class="QMainWindow" name="Notepad"> <property name="geometry"> <rect> <x>0</x> <y>0</y> <width>400</width> <height>300</height> </rect> </property> <property name="windowTitle"> <string>Notepad</string> </property> <widget class="QWidget" name="centralWidget"> <widget class="QWidget" name=""> <property name="geometry"> <rect> <x>70</x> <y>0</y> <width>268</width> <height>235</height> </rect> </property> <layout class="QVBoxLayout" name="verticalLayout"> <item> <widget class="QTextEdit" name="textEdit"/> </item> <item> <widget class="QPushButton" name="quitButton"> <property name="text"> <string>Quit</string> </property> </widget> </item> </layout> </widget> </widget> <widget class="QMenuBar" name="menuBar"> ... ✗ the user interface is stored in a file using XML
  • 38. Dragoş Acostăchioaie - http://www.unixinside.org Qt Examples. A text editor. Main source file Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014 #include "notepad.h" #include <QApplication> int main(int argc, char *argv[]) { QApplication a(argc, argv); Notepad w; w.show(); return a.exec(); }
  • 39. Dragoş Acostăchioaie - http://www.unixinside.org Qt Examples. A text editor. The header file Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014 #include <QMainWindow> namespace Ui { class Notepad; } class Notepad : public QMainWindow { Q_OBJECT public: Notepad(QWidget *parent = 0); ~Notepad(); private slots: void on_quitButton_clicked(); private: Ui::Notepad *ui; }; ✗ the class declaration contains the Q_OBJECT macro ✗ It must come first in the class definition ✗ the Q_OBJECT macro declares our class as a Qobject ✗ the value 0 for parent argument in calling Notepad constructor means the widget has no parent (is a top- level widget) ✗ QtDesigner connects the button's clicked() signal to a slot in the Notepad class ✗ we only need to declare a slot with a name that follows a standard convention
  • 40. Dragoş Acostăchioaie - http://www.unixinside.org Qt Examples. A text editor. The source file Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014 #include "notepad.h" #include "ui_notepad.h" Notepad::Notepad(QWidget *parent) : QMainWindow(parent), ui(new Ui::Notepad) { ui->setupUi(this); } Notepad::~Notepad() { delete ui; } void Notepad::on_quitButton_clicked() { qApp->quit(); } ✗ the header and source files has been generated by the wizard ✗ the ui_notepad.h file has been generated by the uic tool
  • 41. Dragoş Acostăchioaie - http://www.unixinside.org Qt Examples. A text editor. The source file Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014 ✗ Qt Designer adds the private slots on_actionOpen_triggered() and on_actionSave_triggered() ✗ we will implement these functions in notepad.h
  • 42. Dragoş Acostăchioaie - http://www.unixinside.org Qt Examples. A text editor. The source file Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014 void Notepad::on_actionOpen_triggered() { QString fileName = QFileDialog::getOpenFileName(this, tr("Open File"), QString(), tr("Text Files (*.txt);;C++ Files (*.cpp *.h)")); if (!fileName.isEmpty()) { QFile file(fileName); if (!file.open(QIODevice::ReadOnly)) { QMessageBox::critical(this, tr("Error"), tr("Could not open file")); return; } QTextStream in(&file); ui->textEdit->setText(in.readAll()); file.close(); } } ✗ the static getOpenFileName() function displays a modal file dialog. It returns the file path of the file selected, or an empty string if the user canceled the dialog ✗ we try to open the file with open(), which returns true if the file could be opened ✗ we read the data using the QTextStream class, which wraps the QFile object. The readAll() function returns the contents of the file as a Qstring ✗ we use the function tr() for visibile strings to provide translations
  • 43. Dragoş Acostăchioaie - http://www.unixinside.org Qt Examples. A text editor. The source file Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014 void Notepad::on_actionSave_triggered() { QString fileName = QFileDialog::getSaveFileName(this, tr("Save File"), QString(), tr("Text Files (*.txt);;C++ Files (*.cpp *.h)")); if (!fileName.isEmpty()) { QFile file(fileName); if (!file.open(QIODevice::WriteOnly)) { // error message } else { QTextStream stream(&file); stream << ui->textEdit->toPlainText(); stream.flush(); file.close(); } } } ✗ we write the contents of the text edit to the file, using the QTextStream class ✗ QTextStream can also write QStrings to the file with the << operator
  • 44. Dragoş Acostăchioaie - http://www.unixinside.org Qt Examples. A text editor. The project file Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014 QT += core gui greaterThan(QT_MAJOR_VERSION, 4): QT += widgets TARGET = Notepad TEMPLATE = app SOURCES += main.cpp notepad.cpp HEADERS += notepad.h FORMS += notepad.ui ✗ the project file specifies: the application name, the forms, header and source files used by the application ✗ the QT argument specifies the modules used by the application
  • 45. Dragoş Acostăchioaie - http://www.unixinside.org Qt Examples. A text editor. Building and running the project Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014 ✗ build and run the project in QtCreator ✗ we can also use at the command line: ✗ qmake – reads the project file and produces a Makefile with instructions ✗ make (or nmake on Windows)
  • 46. Dragoş Acostăchioaie - http://www.unixinside.org Resources Şcoala de vară “Informatică la castel”, Macea, 25 – 31 august 2014 ✗ Qt documentation - http://qt-project.org/doc/ ✗ Mark Summerfield books - http://www.qtrac.eu/marksummerfield.html ✗ Learning Qt videos - https://www.ics.com/learning/icsnetwork