SlideShare uma empresa Scribd logo
1 de 50
Baixar para ler offline
QMLQt Quick
на практике
Хомяков Сергей
Какой UI требует рынок?
Требуется тесное
взаимодействие между
разработчиком
и дизайнером
horizontalLayoutWidget->setGeometry(QRect(10, 0, 501, 51));
horizontalLayout = new QHBoxLayout(horizontalLayoutWidget);
horizontalLayout->setSpacing(6);
horizontalLayout->setContentsMargins(11, 11, 11, 11);
horizontalLayout->setContentsMargins(0, 0, 0, 0);
pushButton_2 = new QPushButton(horizontalLayoutWidget);
horizontalLayout->addWidget(pushButton_2);
pushButton_4 = new QPushButton(horizontalLayoutWidget);
horizontalLayout->addWidget(pushButton_4);
pushButton_3 = new QPushButton(horizontalLayoutWidget);
horizontalLayout->addWidget(pushButton_3);
pushButton = new QPushButton(horizontalLayoutWidget);
horizontalLayout->addWidget(pushButton);
horizontalSlider = new QSlider(centralWidget);
horizontalSlider->setGeometry(QRect(10, 60, 501, 16));
horizontalSlider->setOrientation(Qt::Horizontal);
textEdit = new QTextEdit(centralWidget);
textEdit->setGeometry(QRect(20, 90, 481, 201));
MainWindow->setCentralWidget(centralWidget);
RowLayout {
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
anchors.topMargin: 18
Button { text: qsTr("Button 1") }
Button { text: qsTr("Button 2") }
Button { text: qsTr("Button 3") }
Button { text: qsTr("Button 4") }
}
Slider {
x: 143; y: 57
width: 355; height: 28
}
TextArea {
x: 142; y: 105
width: 355; height: 150
}
Что такое QML?
QML
это JSON-подобный декларативный язык программирования,
основанный на JavaScript, использующий С++ API для интеграции с Qt
Qt Quick
это scenegraph-based UI framework, использующий в качестве языка
программирования QML и позиционирующий себя как инструмент
для быстрой разработки и прототипирования
Где уместно использовать Qt Quick?
Там где вы уже используете Qt
Там где требуется не стандартный (вычурный) UI
Там где необходим кросплатформенный “look and feel”
Там где есть постоянно меняющиеся требования к дизайну и бизнес-
логике
Hello World
Hello World
Hello World
Hello World
import QtQuick 2.0
Rectangle {
id: root
width: 120; height: 240
color: "#D8D8D8"
Image {
id: world
x: (parent.width - width)/2
y: 40
source: 'assets/world.png'
}
Text {
y: world.y + world.height + 20
width: root.width
horizontalAlignment: Text.AlignHCenter
text: 'Hello World'
}
}
import QtQuick 2.2
Rectangle {
id: photo
objectName: "photo"
property bool thumbnail: false
property alias image: photoImage.source
signal clicked();
color: "gray"
x: 20; y: 20
height: 150
width: {
if(photoImage.width > 200) {
photoImage.width;
} else {
200;
}
}
function doSomething(dx) {
return dx + photoImage.width;
}
onHeightChanged: {
var tmp = doSomething(photo.height);
console.log( tmp );
}
QtObject {
id: p_attr
readonly property color borderSelectedColor: "red"
readonly property color borderUnSelectedColor: "black"
property int animationDuration: 200
}
Rectangle {
id: border
anchors.centerIn: parent
Image { id: photoImage; anchors.centerIn: parent }
}
MouseArea {
anchors.fill: parent
onClicked: photo.clicked();
}
states:[
State {
name: "Selected"
PropertyChanges { target: border; color: p_attr.borderSelectedColor }
},
State {
name: "UnSelected"
PropertyChanges { target: border; color: p_attr.borderUnSelectedColor }
}
]
transitions: Transition {
to: "Selected"
ColorAnimation { target: border; duration: p_attr.animationDuration }
}
}
import QtQuick 2.2
Rectangle {
id: photo
objectName: "photo"
property bool thumbnail: false
property alias image: photoImage.source
signal clicked();
color: "gray"
x: 20; y: 20
height: 150
width: {
if(photoImage.width > 200) {
photoImage.width;
} else {
200;
}
}
function doSomething(dx) {
return dx + photoImage.width;
}
onHeightChanged: {
var tmp = doSomething(photo.height);
console.log( tmp );
}
QtObject {
id: p_attr
readonly property color borderSelectedColor: "red"
readonly property color borderUnSelectedColor: "black"
property int animationDuration: 200
}
Rectangle {
id: border
anchors.centerIn: parent
Image { id: photoImage; anchors.centerIn: parent }
}
MouseArea {
anchors.fill: parent
onClicked: photo.clicked();
}
states:[
State {
name: "Selected"
PropertyChanges { target: border; color: p_attr.borderSelectedColor }
},
State {
name: "UnSelected"
PropertyChanges { target: border; color: p_attr.borderUnSelectedColor }
}
]
transitions: Transition {
to: "Selected"
ColorAnimation { target: border; duration: p_attr.animationDuration }
}
}
import QtQuick 2.2
Rectangle {
id: photo
objectName: "photo"
property bool thumbnail: false
property alias image: photoImage.source
signal clicked();
color: "gray"
x: 20; y: 20
height: 150
width: {
if(photoImage.width > 200) {
photoImage.width;
} else {
200;
}
}
function doSomething(dx) {
return dx + photoImage.width;
}
onHeightChanged: {
var tmp = doSomething(photo.height);
console.log( tmp );
}
QtObject {
id: p_attr
readonly property color borderSelectedColor: "red"
readonly property color borderUnSelectedColor: "black"
property int animationDuration: 200
}
Rectangle {
id: border
anchors.centerIn: parent
Image { id: photoImage; anchors.centerIn: parent }
}
MouseArea {
anchors.fill: parent
onClicked: photo.clicked();
}
states:[
State {
name: "Selected"
PropertyChanges { target: border; color: p_attr.borderSelectedColor }
},
State {
name: "UnSelected"
PropertyChanges { target: border; color: p_attr.borderUnSelectedColor }
}
]
transitions: Transition {
to: "Selected"
ColorAnimation { target: border; duration: p_attr.animationDuration }
}
}
import QtQuick 2.2
Rectangle {
id: photo
objectName: "photo"
property bool thumbnail: false
property alias image: photoImage.source
signal clicked();
color: "gray"
x: 20; y: 20
height: 150
width: {
if(photoImage.width > 200) {
photoImage.width;
} else {
200;
}
}
function doSomething(dx) {
return dx + photoImage.width;
}
onHeightChanged: {
var tmp = doSomething(photo.height);
console.log( tmp );
}
QtObject {
id: p_attr
readonly property color borderSelectedColor: "red"
readonly property color borderUnSelectedColor: "black"
property int animationDuration: 200
}
Rectangle {
id: border
anchors.centerIn: parent
Image { id: photoImage; anchors.centerIn: parent }
}
MouseArea {
anchors.fill: parent
onClicked: photo.clicked();
}
states:[
State {
name: "Selected"
PropertyChanges { target: border; color: p_attr.borderSelectedColor }
},
State {
name: "UnSelected"
PropertyChanges { target: border; color: p_attr.borderUnSelectedColor }
}
]
transitions: Transition {
to: "Selected"
ColorAnimation { target: border; duration: p_attr.animationDuration }
}
}
import QtQuick 2.2
Rectangle {
id: photo
objectName: "photo"
property bool thumbnail: false
property alias image: photoImage.source
signal clicked();
color: "gray"
x: 20; y: 20
height: 150
width: {
if(photoImage.width > 200) {
photoImage.width;
} else {
200;
}
}
function doSomething(dx) {
return dx + photoImage.width;
}
onHeightChanged: {
var tmp = doSomething(photo.height);
console.log( tmp );
}
QtObject {
id: p_attr
readonly property color borderSelectedColor: "red"
readonly property color borderUnSelectedColor: "black"
property int animationDuration: 200
}
Rectangle {
id: border
anchors.centerIn: parent
Image { id: photoImage; anchors.centerIn: parent }
}
MouseArea {
anchors.fill: parent
onClicked: photo.clicked();
}
states:[
State {
name: "Selected"
PropertyChanges { target: border; color: p_attr.borderSelectedColor }
},
State {
name: "UnSelected"
PropertyChanges { target: border; color: p_attr.borderUnSelectedColor }
}
]
transitions: Transition {
to: "Selected"
ColorAnimation { target: border; duration: p_attr.animationDuration }
}
}
import QtQuick 2.2
Rectangle {
id: photo
objectName: "photo"
property bool thumbnail: false
property alias image: photoImage.source
signal clicked();
color: "gray"
x: 20; y: 20
height: 150
width: {
if(photoImage.width > 200) {
photoImage.width;
} else {
200;
}
}
function doSomething(dx) {
return dx + photoImage.width;
}
onHeightChanged: {
var tmp = doSomething(photo.height);
console.log( tmp );
}
QtObject {
id: p_attr
readonly property color borderSelectedColor: "red"
readonly property color borderUnSelectedColor: "black"
property int animationDuration: 200
}
Rectangle {
id: border
anchors.centerIn: parent
Image { id: photoImage; anchors.centerIn: parent }
}
MouseArea {
anchors.fill: parent
onClicked: photo.clicked();
}
states:[
State {
name: "Selected"
PropertyChanges { target: border; color: p_attr.borderSelectedColor }
},
State {
name: "UnSelected"
PropertyChanges { target: border; color: p_attr.borderUnSelectedColor }
}
]
transitions: Transition {
to: "Selected"
ColorAnimation { target: border; duration: p_attr.animationDuration }
}
}
import QtQuick 2.2
Rectangle {
id: photo
objectName: "photo"
property bool thumbnail: false
property alias image: photoImage.source
signal clicked();
color: "gray"
x: 20; y: 20
height: 150
width: {
if(photoImage.width > 200) {
photoImage.width;
} else {
200;
}
}
function doSomething(dx) {
return dx + photoImage.width;
}
onHeightChanged: {
var tmp = doSomething(photo.height);
console.log( tmp );
}
QtObject {
id: p_attr
readonly property color borderSelectedColor: "red"
readonly property color borderUnSelectedColor: "black"
property int animationDuration: 200
}
Rectangle {
id: border
anchors.centerIn: parent
Image { id: photoImage; anchors.centerIn: parent }
}
MouseArea {
anchors.fill: parent
onClicked: photo.clicked();
}
states:[
State {
name: "Selected"
PropertyChanges { target: border; color: p_attr.borderSelectedColor }
},
State {
name: "UnSelected"
PropertyChanges { target: border; color: p_attr.borderUnSelectedColor }
}
]
transitions: Transition {
to: "Selected"
ColorAnimation { target: border; duration: p_attr.animationDuration }
}
}
import QtQuick 2.2
Rectangle {
id: photo
objectName: "photo"
property bool thumbnail: false
property alias image: photoImage.source
signal clicked();
color: "gray"
x: 20; y: 20
height: 150
width: {
if(photoImage.width > 200) {
photoImage.width;
} else {
200;
}
}
function doSomething(dx) {
return dx + photoImage.width;
}
onHeightChanged: {
var tmp = doSomething(photo.height);
console.log( tmp );
}
QtObject {
id: p_attr
readonly property color borderSelectedColor: "red"
readonly property color borderUnSelectedColor: "black"
property int animationDuration: 200
}
Rectangle {
id: border
anchors.centerIn: parent
Image { id: photoImage; anchors.centerIn: parent }
}
MouseArea {
anchors.fill: parent
onClicked: photo.clicked();
}
states:[
State {
name: "Selected"
PropertyChanges { target: border; color: p_attr.borderSelectedColor }
},
State {
name: "UnSelected"
PropertyChanges { target: border; color: p_attr.borderUnSelectedColor }
}
]
transitions: Transition {
to: "Selected"
ColorAnimation { target: border; duration: p_attr.animationDuration }
}
}
import QtQuick 2.2
Rectangle {
id: photo
objectName: "photo"
property bool thumbnail: false
property alias image: photoImage.source
signal clicked();
color: "gray"
x: 20; y: 20
height: 150
width: {
if(photoImage.width > 200) {
photoImage.width;
} else {
200;
}
}
function doSomething(dx) {
return dx + photoImage.width;
}
onHeightChanged: {
var tmp = doSomething(photo.height);
console.log( tmp );
}
QtObject {
id: p_attr
readonly property color borderSelectedColor: "red"
readonly property color borderUnSelectedColor: "black"
property int animationDuration: 200
}
Rectangle {
id: border
anchors.centerIn: parent
Image { id: photoImage; anchors.centerIn: parent }
}
MouseArea {
anchors.fill: parent
onClicked: photo.clicked();
}
states:[
State {
name: "Selected"
PropertyChanges { target: border; color: p_attr.borderSelectedColor }
},
State {
name: "UnSelected"
PropertyChanges { target: border; color: p_attr.borderUnSelectedColor }
}
]
transitions: Transition {
to: "Selected"
ColorAnimation { target: border; duration: p_attr.animationDuration }
}
}
// Circle.qml
import QtQuick 2.0
Rectangle {
property real diameter : 30
width: diameter
height: diameter
radius: diameter
}
import QtQuick 2.0
Rectangle {
width: 120; height: 240
Column {
anchors.fill: parent
Repeater {
model: 3
Circle {
color: "blue"
diameter: 90
}
}
}
}
Позиционирование
и выравнивание
Якоря бывают двух видов:
-ссылающиеся на элемент (centerIn, fill)
-ссылающиеся на другой якорь ( left, right, top, bottom, …. )
import QtQuick 2.0
Rectangle {
id: root
width: 120; height: 240
color: "#D8D8D8"
Image {
id: world
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
anchors.topMargin: 40
source: 'assets/world.png'
}
Text {
anchors.top: world.bottom
anchors.topMargin: 20
anchors.horizontalCenter: world.horizontalCenter
text: 'Hello World'
}
}
Hello World
Причём тут С++?
С++ API позволяет:
– экспортировать в QML C++ обьекты наследованные от QObject
– экспортировать в QML не визуальные типы
– классы на основе QQuickPaintedItem для визуальных элементов с
поддержкой QPainter
– классы на основе QQuickItem для визуальных элементов сцены
Экспорт С++ объекта
class User : public QObject
{
Q_OBJECT
Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
Q_PROPERTY(int age READ age WRITE setAge NOTIFY ageChanged)
public:
User(const QString &name, int age, QObject *parent = 0);
...
}
void main( int argc, char* argv[] ) {
...
User *currentUser = new User("Alice", 29);
QQuickView *view = new QQuickView;
QQmlContext *context = view->engine()->rootContext();
context->setContextProperty("currentUser", currentUser);
...
}
void main( int argc, char* argv[] ) {
...
User *currentUser = new User("Alice", 29);
QQuickView *view = new QQuickView;
QQmlContext *context = view->engine()->rootContext();
context->setContextProperty("currentUser", currentUser);
...
}
Text {
text : currentUser.name
}
Экспорт С++ типа
#include <QObject>
class CustomTimer : public QObject
{
Q_OBJECT
Q_PROPERTY( int interval READ interval WRITE setInterval NOTIFY intervalChanged )
public:
CustomTimer(QObject *parent = 0);
int interval() const;
public slots:
void start();
void stop();
void setInterval(int arg);
signals:
void intervalChanged(int arg);
void timeout();
private:
QTimer* m_timer;
int m_interval;
};
#include <QGuiApplication>
#include <QQuickView>
#include "CustomTimer.h"
int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
qmlRegisterType<CustomTimer>("CustomComponents", 1, 0, "CustomTimer");
QQuickView view;
view.setSource(QUrl("qrc:///main.qml"));
view.show();
return app.exec();
}
import CustomComponents 1.0
Rectangle {
id: root
Component.onCompleted: {
timer.start();
}
……..
CustomTimer {
id: timer
interval: 3000
onTimeout: {
console.log( "Timer timeout!" );
root.color = "red";
}
}
}
Экспорт QQuickPaintedltem
#include <QQuickPaintedItem>
class EllipseItem : public QQuickPaintedItem
{
Q_OBJECT
public:
EllipseItem(QQuickItem *parent = 0);
void paint(QPainter *painter);
};
void EllipseItem::paint(QPainter *painter)
{
const qreal halfPenWidth = qMax(painter->pen().width() / 2.0, 1.0);
QRectF rect = boundingRect();
rect.adjust(halfPenWidth, halfPenWidth, -halfPenWidth, -halfPenWidth);
painter->drawEllipse(rect);
}
#include <QGuiApplication>
#include <QQuickView>
#include "EllipseItem.h"
int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
qmlRegisterType<EllipseItem>("CustomComponents", 1, 0, "Ellipse");
QQuickView view;
view.setSource(QUrl("qrc:///main.qml"));
view.show();
return app.exec();
}
import CustomComponents 1.0
Rectangle {
id: root
EllipseItem {
anchors.centerIn: parent
width: 64
height: 48
}
}
Экспорт QQuickltem
#include <QQuickItem>
#include <QSGGeometry>
#include <QSGFlatColorMaterial>
class TriangleItem : public QQuickItem
{
Q_OBJECT
public:
TriangleItem(QQuickItem *parent = 0);
protected:
QSGNode *updatePaintNode(QSGNode *node, UpdatePaintNodeData *data);
private:
QSGGeometry m_geometry;
QSGFlatColorMaterial m_material;
};
QSGNode *TriangleItem::updatePaintNode(QSGNode *n, UpdatePaintNodeData *)
{
QSGGeometryNode *node = static_cast<QSGGeometryNode *>(n);
if (!node) node = new QSGGeometryNode();
QSGGeometry::Point2D *v = m_geometry.vertexDataAsPoint2D();
const QRectF rect = boundingRect();
v[0].x = rect.left();
v[0].y = rect.bottom();
v[1].x = rect.left() + rect.width()/2;
v[1].y = rect.top();
v[2].x = rect.right();
v[2].y = rect.bottom();
node->setGeometry(&m_geometry);
node->setMaterial(&m_material);
return node;
}
QSGNode * QQuickCustomItem::updatePaintNode(QSGNode * node, UpdatePaintNodeData * nodedata)
{
TexureHolderNode * texture_node = static_cast<TexureHolderNode *>(node);
if (!texture_node) texture_node = new TexureHolderNode();
if (texture_node->fbo_ && (texture_node->fbo_->width() != width() || texture_node->fbo_->height() != height()))
{
texture_node->fbo_.reset();
}
if (texture_node->fbo_.isNull())
{
QSize fboSize(qMax<int>(1, int(width())), qMax<int>(1, int(height())));
QOpenGLFramebufferObjectFormat format;
texture_node->fbo_.reset(new QOpenGLFramebufferObject(fboSize, format));
texture_node->setTexture( window()->createTextureFromId( texture_node->fbo_->texture(), texture_node->fbo_->size(), 0) );
texture_node->setRect(0, 0, width(), height());
redraw_texture_needed_ = true;
}
if (redraw_texture_needed_)
{
redraw_texture_needed_ = false;
texture_node->fbo_->bind();
{
paintGL();
}
texture_node->fbo_->bindDefault();
texture_node->markDirty(QSGNode::DirtyMaterial);
}
return texture_node;
}
class TexureHolderNode
: public QSGSimpleTextureNode
{
public:
TexureHolderNode() {}
QScopedPointer<QOpenGLFramebufferObject> fbo_;
};
https://github.com/2gis/qtandroidextensions
Что нужно оставлять
в плюсах, что лучше перенести в
QML?
Инструменты разработки
и отладки
Autopilot-Qt5QtCreator GammaRay Squish
– qt.io/ru/download-open-source
– kdab.com/gammaray
– froglogic.com/squish
– wiki.ubuntu.com/Touch/Testing/Autopilot
Вопросы?
Хомяков Сергей
s.homyakov@2gis.ru

Mais conteúdo relacionado

Mais procurados

Александр Зимин – Анимация как средство самовыражения
Александр Зимин – Анимация как средство самовыраженияАлександр Зимин – Анимация как средство самовыражения
Александр Зимин – Анимация как средство самовыраженияCocoaHeads
 
Integration of Google-map in Rails Application
Integration of Google-map in Rails ApplicationIntegration of Google-map in Rails Application
Integration of Google-map in Rails ApplicationSwati Jadhav
 
Enhancing UI/UX using Java animations
Enhancing UI/UX using Java animationsEnhancing UI/UX using Java animations
Enhancing UI/UX using Java animationsNaman Dwivedi
 
The Ring programming language version 1.9 book - Part 14 of 210
The Ring programming language version 1.9 book - Part 14 of 210The Ring programming language version 1.9 book - Part 14 of 210
The Ring programming language version 1.9 book - Part 14 of 210Mahmoud Samir Fayed
 
The Ring programming language version 1.8 book - Part 12 of 202
The Ring programming language version 1.8 book - Part 12 of 202The Ring programming language version 1.8 book - Part 12 of 202
The Ring programming language version 1.8 book - Part 12 of 202Mahmoud Samir Fayed
 
The Ring programming language version 1.7 book - Part 63 of 196
The Ring programming language version 1.7 book - Part 63 of 196The Ring programming language version 1.7 book - Part 63 of 196
The Ring programming language version 1.7 book - Part 63 of 196Mahmoud Samir Fayed
 
The Ring programming language version 1.5.3 book - Part 70 of 184
The Ring programming language version 1.5.3 book - Part 70 of 184The Ring programming language version 1.5.3 book - Part 70 of 184
The Ring programming language version 1.5.3 book - Part 70 of 184Mahmoud Samir Fayed
 
Building Apps with Flutter - Hillel Coren, Invoice Ninja
Building Apps with Flutter - Hillel Coren, Invoice NinjaBuilding Apps with Flutter - Hillel Coren, Invoice Ninja
Building Apps with Flutter - Hillel Coren, Invoice NinjaDroidConTLV
 
How Quick Can We Be? Data Visualization Techniques for Engineers.
How Quick Can We Be? Data Visualization Techniques for Engineers. How Quick Can We Be? Data Visualization Techniques for Engineers.
How Quick Can We Be? Data Visualization Techniques for Engineers. Avni Khatri
 
The Ring programming language version 1.5.2 book - Part 63 of 181
The Ring programming language version 1.5.2 book - Part 63 of 181The Ring programming language version 1.5.2 book - Part 63 of 181
The Ring programming language version 1.5.2 book - Part 63 of 181Mahmoud Samir Fayed
 
Lec 11 12_sept [compatibility mode]
Lec 11 12_sept [compatibility mode]Lec 11 12_sept [compatibility mode]
Lec 11 12_sept [compatibility mode]Palak Sanghani
 
The Ring programming language version 1.4.1 book - Part 18 of 31
The Ring programming language version 1.4.1 book - Part 18 of 31The Ring programming language version 1.4.1 book - Part 18 of 31
The Ring programming language version 1.4.1 book - Part 18 of 31Mahmoud Samir Fayed
 
The Ring programming language version 1.10 book - Part 70 of 212
The Ring programming language version 1.10 book - Part 70 of 212The Ring programming language version 1.10 book - Part 70 of 212
The Ring programming language version 1.10 book - Part 70 of 212Mahmoud Samir Fayed
 
The Ring programming language version 1.6 book - Part 73 of 189
The Ring programming language version 1.6 book - Part 73 of 189The Ring programming language version 1.6 book - Part 73 of 189
The Ring programming language version 1.6 book - Part 73 of 189Mahmoud Samir Fayed
 

Mais procurados (18)

Games 3 dl4-example
Games 3 dl4-exampleGames 3 dl4-example
Games 3 dl4-example
 
Александр Зимин – Анимация как средство самовыражения
Александр Зимин – Анимация как средство самовыраженияАлександр Зимин – Анимация как средство самовыражения
Александр Зимин – Анимация как средство самовыражения
 
Integration of Google-map in Rails Application
Integration of Google-map in Rails ApplicationIntegration of Google-map in Rails Application
Integration of Google-map in Rails Application
 
Real life XNA
Real life XNAReal life XNA
Real life XNA
 
iOS Training Session-3
iOS Training Session-3iOS Training Session-3
iOS Training Session-3
 
Enhancing UI/UX using Java animations
Enhancing UI/UX using Java animationsEnhancing UI/UX using Java animations
Enhancing UI/UX using Java animations
 
The Ring programming language version 1.9 book - Part 14 of 210
The Ring programming language version 1.9 book - Part 14 of 210The Ring programming language version 1.9 book - Part 14 of 210
The Ring programming language version 1.9 book - Part 14 of 210
 
The Ring programming language version 1.8 book - Part 12 of 202
The Ring programming language version 1.8 book - Part 12 of 202The Ring programming language version 1.8 book - Part 12 of 202
The Ring programming language version 1.8 book - Part 12 of 202
 
The Ring programming language version 1.7 book - Part 63 of 196
The Ring programming language version 1.7 book - Part 63 of 196The Ring programming language version 1.7 book - Part 63 of 196
The Ring programming language version 1.7 book - Part 63 of 196
 
The Ring programming language version 1.5.3 book - Part 70 of 184
The Ring programming language version 1.5.3 book - Part 70 of 184The Ring programming language version 1.5.3 book - Part 70 of 184
The Ring programming language version 1.5.3 book - Part 70 of 184
 
Building Apps with Flutter - Hillel Coren, Invoice Ninja
Building Apps with Flutter - Hillel Coren, Invoice NinjaBuilding Apps with Flutter - Hillel Coren, Invoice Ninja
Building Apps with Flutter - Hillel Coren, Invoice Ninja
 
How Quick Can We Be? Data Visualization Techniques for Engineers.
How Quick Can We Be? Data Visualization Techniques for Engineers. How Quick Can We Be? Data Visualization Techniques for Engineers.
How Quick Can We Be? Data Visualization Techniques for Engineers.
 
The Ring programming language version 1.5.2 book - Part 63 of 181
The Ring programming language version 1.5.2 book - Part 63 of 181The Ring programming language version 1.5.2 book - Part 63 of 181
The Ring programming language version 1.5.2 book - Part 63 of 181
 
Lec 11 12_sept [compatibility mode]
Lec 11 12_sept [compatibility mode]Lec 11 12_sept [compatibility mode]
Lec 11 12_sept [compatibility mode]
 
The Ring programming language version 1.4.1 book - Part 18 of 31
The Ring programming language version 1.4.1 book - Part 18 of 31The Ring programming language version 1.4.1 book - Part 18 of 31
The Ring programming language version 1.4.1 book - Part 18 of 31
 
Canvas al ajillo
Canvas al ajilloCanvas al ajillo
Canvas al ajillo
 
The Ring programming language version 1.10 book - Part 70 of 212
The Ring programming language version 1.10 book - Part 70 of 212The Ring programming language version 1.10 book - Part 70 of 212
The Ring programming language version 1.10 book - Part 70 of 212
 
The Ring programming language version 1.6 book - Part 73 of 189
The Ring programming language version 1.6 book - Part 73 of 189The Ring programming language version 1.6 book - Part 73 of 189
The Ring programming language version 1.6 book - Part 73 of 189
 

Destaque

Как мы уменьшили количество ошибок в Unreal Engine с помощью статического ана...
Как мы уменьшили количество ошибок в Unreal Engine с помощью статического ана...Как мы уменьшили количество ошибок в Unreal Engine с помощью статического ана...
Как мы уменьшили количество ошибок в Unreal Engine с помощью статического ана...Platonov Sergey
 
Дмитрий Кашицын, Вывод типов в динамических и не очень языках II
Дмитрий Кашицын, Вывод типов в динамических и не очень языках IIДмитрий Кашицын, Вывод типов в динамических и не очень языках II
Дмитрий Кашицын, Вывод типов в динамических и не очень языках IIPlatonov Sergey
 
Евгений Крутько, Многопоточные вычисления, современный подход.
Евгений Крутько, Многопоточные вычисления, современный подход.Евгений Крутько, Многопоточные вычисления, современный подход.
Евгений Крутько, Многопоточные вычисления, современный подход.Platonov Sergey
 
Павел Беликов, Опыт мигрирования крупного проекта с Windows-only на Linux
Павел Беликов, Опыт мигрирования крупного проекта с Windows-only на LinuxПавел Беликов, Опыт мигрирования крупного проекта с Windows-only на Linux
Павел Беликов, Опыт мигрирования крупного проекта с Windows-only на LinuxPlatonov Sergey
 
Функциональный микроскоп: линзы в C++
Функциональный микроскоп: линзы в C++Функциональный микроскоп: линзы в C++
Функциональный микроскоп: линзы в C++Platonov Sergey
 
Визуализация автомобильных маршрутов
Визуализация автомобильных маршрутовВизуализация автомобильных маршрутов
Визуализация автомобильных маршрутовPlatonov Sergey
 
HPX: C++11 runtime система для параллельных и распределённых вычислений
HPX: C++11 runtime система для параллельных и распределённых вычисленийHPX: C++11 runtime система для параллельных и распределённых вычислений
HPX: C++11 runtime система для параллельных и распределённых вычисленийPlatonov Sergey
 
Ranges calendar-novosibirsk-2015-08
Ranges calendar-novosibirsk-2015-08Ranges calendar-novosibirsk-2015-08
Ranges calendar-novosibirsk-2015-08Platonov Sergey
 
Тененёв Анатолий, Boost.Asio в алгоритмической торговле
Тененёв Анатолий, Boost.Asio в алгоритмической торговлеТененёв Анатолий, Boost.Asio в алгоритмической торговле
Тененёв Анатолий, Boost.Asio в алгоритмической торговлеPlatonov Sergey
 
Дмитрий Кашицын, Вывод типов в динамических и не очень языках I
Дмитрий Кашицын, Вывод типов в динамических и не очень языках IДмитрий Кашицын, Вывод типов в динамических и не очень языках I
Дмитрий Кашицын, Вывод типов в динамических и не очень языках IPlatonov Sergey
 
Антон Бикинеев, Reflection in C++Next
Антон Бикинеев,  Reflection in C++NextАнтон Бикинеев,  Reflection in C++Next
Антон Бикинеев, Reflection in C++NextSergey Platonov
 
Григорий Демченко, Универсальный адаптер
Григорий Демченко, Универсальный адаптерГригорий Демченко, Универсальный адаптер
Григорий Демченко, Универсальный адаптерSergey Platonov
 
Использование юнит-тестов для повышения качества разработки
Использование юнит-тестов для повышения качества разработкиИспользование юнит-тестов для повышения качества разработки
Использование юнит-тестов для повышения качества разработкиvictor-yastrebov
 
Евгений Рыжков, Андрей Карпов Как потратить 10 лет на разработку анализатора ...
Евгений Рыжков, Андрей Карпов Как потратить 10 лет на разработку анализатора ...Евгений Рыжков, Андрей Карпов Как потратить 10 лет на разработку анализатора ...
Евгений Рыжков, Андрей Карпов Как потратить 10 лет на разработку анализатора ...Platonov Sergey
 
Сергей Шамбир, Адаптация Promise/A+ для взаимодействия между C++ и Javascript
Сергей Шамбир, Адаптация Promise/A+ для взаимодействия между C++ и JavascriptСергей Шамбир, Адаптация Promise/A+ для взаимодействия между C++ и Javascript
Сергей Шамбир, Адаптация Promise/A+ для взаимодействия между C++ и JavascriptSergey Platonov
 
Полухин Антон, Как делать не надо: C++ велосипедостроение для профессионалов
Полухин Антон, Как делать не надо: C++ велосипедостроение для профессионаловПолухин Антон, Как делать не надо: C++ велосипедостроение для профессионалов
Полухин Антон, Как делать не надо: C++ велосипедостроение для профессионаловSergey Platonov
 
Алексей Кутумов, C++ без исключений, часть 3
Алексей Кутумов,  C++ без исключений, часть 3Алексей Кутумов,  C++ без исключений, часть 3
Алексей Кутумов, C++ без исключений, часть 3Platonov Sergey
 

Destaque (20)

C++ exceptions
C++ exceptionsC++ exceptions
C++ exceptions
 
Как мы уменьшили количество ошибок в Unreal Engine с помощью статического ана...
Как мы уменьшили количество ошибок в Unreal Engine с помощью статического ана...Как мы уменьшили количество ошибок в Unreal Engine с помощью статического ана...
Как мы уменьшили количество ошибок в Unreal Engine с помощью статического ана...
 
Дмитрий Кашицын, Вывод типов в динамических и не очень языках II
Дмитрий Кашицын, Вывод типов в динамических и не очень языках IIДмитрий Кашицын, Вывод типов в динамических и не очень языках II
Дмитрий Кашицын, Вывод типов в динамических и не очень языках II
 
Евгений Крутько, Многопоточные вычисления, современный подход.
Евгений Крутько, Многопоточные вычисления, современный подход.Евгений Крутько, Многопоточные вычисления, современный подход.
Евгений Крутько, Многопоточные вычисления, современный подход.
 
Павел Беликов, Опыт мигрирования крупного проекта с Windows-only на Linux
Павел Беликов, Опыт мигрирования крупного проекта с Windows-only на LinuxПавел Беликов, Опыт мигрирования крупного проекта с Windows-only на Linux
Павел Беликов, Опыт мигрирования крупного проекта с Windows-only на Linux
 
Функциональный микроскоп: линзы в C++
Функциональный микроскоп: линзы в C++Функциональный микроскоп: линзы в C++
Функциональный микроскоп: линзы в C++
 
Визуализация автомобильных маршрутов
Визуализация автомобильных маршрутовВизуализация автомобильных маршрутов
Визуализация автомобильных маршрутов
 
HPX: C++11 runtime система для параллельных и распределённых вычислений
HPX: C++11 runtime система для параллельных и распределённых вычисленийHPX: C++11 runtime система для параллельных и распределённых вычислений
HPX: C++11 runtime система для параллельных и распределённых вычислений
 
Ranges calendar-novosibirsk-2015-08
Ranges calendar-novosibirsk-2015-08Ranges calendar-novosibirsk-2015-08
Ranges calendar-novosibirsk-2015-08
 
Тененёв Анатолий, Boost.Asio в алгоритмической торговле
Тененёв Анатолий, Boost.Asio в алгоритмической торговлеТененёв Анатолий, Boost.Asio в алгоритмической торговле
Тененёв Анатолий, Boost.Asio в алгоритмической торговле
 
Дмитрий Кашицын, Вывод типов в динамических и не очень языках I
Дмитрий Кашицын, Вывод типов в динамических и не очень языках IДмитрий Кашицын, Вывод типов в динамических и не очень языках I
Дмитрий Кашицын, Вывод типов в динамических и не очень языках I
 
Антон Бикинеев, Reflection in C++Next
Антон Бикинеев,  Reflection in C++NextАнтон Бикинеев,  Reflection in C++Next
Антон Бикинеев, Reflection in C++Next
 
Григорий Демченко, Универсальный адаптер
Григорий Демченко, Универсальный адаптерГригорий Демченко, Универсальный адаптер
Григорий Демченко, Универсальный адаптер
 
Использование юнит-тестов для повышения качества разработки
Использование юнит-тестов для повышения качества разработкиИспользование юнит-тестов для повышения качества разработки
Использование юнит-тестов для повышения качества разработки
 
Clang tidy
Clang tidyClang tidy
Clang tidy
 
Евгений Рыжков, Андрей Карпов Как потратить 10 лет на разработку анализатора ...
Евгений Рыжков, Андрей Карпов Как потратить 10 лет на разработку анализатора ...Евгений Рыжков, Андрей Карпов Как потратить 10 лет на разработку анализатора ...
Евгений Рыжков, Андрей Карпов Как потратить 10 лет на разработку анализатора ...
 
Сергей Шамбир, Адаптация Promise/A+ для взаимодействия между C++ и Javascript
Сергей Шамбир, Адаптация Promise/A+ для взаимодействия между C++ и JavascriptСергей Шамбир, Адаптация Promise/A+ для взаимодействия между C++ и Javascript
Сергей Шамбир, Адаптация Promise/A+ для взаимодействия между C++ и Javascript
 
Parallel STL
Parallel STLParallel STL
Parallel STL
 
Полухин Антон, Как делать не надо: C++ велосипедостроение для профессионалов
Полухин Антон, Как делать не надо: C++ велосипедостроение для профессионаловПолухин Антон, Как делать не надо: C++ велосипедостроение для профессионалов
Полухин Антон, Как делать не надо: C++ велосипедостроение для профессионалов
 
Алексей Кутумов, C++ без исключений, часть 3
Алексей Кутумов,  C++ без исключений, часть 3Алексей Кутумов,  C++ без исключений, часть 3
Алексей Кутумов, C++ без исключений, часть 3
 

Semelhante a QML\Qt Quick на практике

Ubuntu app development
Ubuntu app development Ubuntu app development
Ubuntu app development Xiaoguo Liu
 
UI Design From Scratch - Part 5 - transcript.pdf
UI Design From Scratch - Part 5 - transcript.pdfUI Design From Scratch - Part 5 - transcript.pdf
UI Design From Scratch - Part 5 - transcript.pdfShaiAlmog1
 
Creating an Uber Clone - Part XXII.pdf
Creating an Uber Clone - Part XXII.pdfCreating an Uber Clone - Part XXII.pdf
Creating an Uber Clone - Part XXII.pdfShaiAlmog1
 
I need to create a page looks like a picture. But it looks different.pdf
I need to create a page looks like a picture. But it looks different.pdfI need to create a page looks like a picture. But it looks different.pdf
I need to create a page looks like a picture. But it looks different.pdfallurafashions98
 
Making Games in JavaScript
Making Games in JavaScriptMaking Games in JavaScript
Making Games in JavaScriptSam Cartwright
 
Creating an Uber Clone - Part XXII - Transcript.pdf
Creating an Uber Clone - Part XXII - Transcript.pdfCreating an Uber Clone - Part XXII - Transcript.pdf
Creating an Uber Clone - Part XXII - Transcript.pdfShaiAlmog1
 
Yahoo Open Source - The Tour & Mystery of AppDevKit (MOPCON 2016)
Yahoo Open Source - The Tour & Mystery of AppDevKit (MOPCON 2016)Yahoo Open Source - The Tour & Mystery of AppDevKit (MOPCON 2016)
Yahoo Open Source - The Tour & Mystery of AppDevKit (MOPCON 2016)anistar sung
 
Creating an Uber Clone - Part IV - Transcript.pdf
Creating an Uber Clone - Part IV - Transcript.pdfCreating an Uber Clone - Part IV - Transcript.pdf
Creating an Uber Clone - Part IV - Transcript.pdfShaiAlmog1
 
UI Design From Scratch - Part 5.pdf
UI Design From Scratch - Part 5.pdfUI Design From Scratch - Part 5.pdf
UI Design From Scratch - Part 5.pdfShaiAlmog1
 
Creating an Uber Clone - Part XXI.pdf
Creating an Uber Clone - Part XXI.pdfCreating an Uber Clone - Part XXI.pdf
Creating an Uber Clone - Part XXI.pdfShaiAlmog1
 
Version1.0 StartHTML000000232 EndHTML000065057 StartFragment0000.docx
Version1.0 StartHTML000000232 EndHTML000065057 StartFragment0000.docxVersion1.0 StartHTML000000232 EndHTML000065057 StartFragment0000.docx
Version1.0 StartHTML000000232 EndHTML000065057 StartFragment0000.docxtienboileau
 
Exploring Canvas
Exploring CanvasExploring Canvas
Exploring CanvasKevin Hoyt
 
Kotlin Mullets
Kotlin MulletsKotlin Mullets
Kotlin MulletsJames Ward
 
Synchronizing without internet - Multipeer Connectivity (iOS)
Synchronizing without internet - Multipeer Connectivity (iOS)Synchronizing without internet - Multipeer Connectivity (iOS)
Synchronizing without internet - Multipeer Connectivity (iOS)Jorge Maroto
 
Petri Niemi Qt Advanced Part 2
Petri Niemi Qt Advanced Part 2Petri Niemi Qt Advanced Part 2
Petri Niemi Qt Advanced Part 2NokiaAppForum
 
AWS IoTで家庭内IoTをやってみた【JAWS DAYS 2016】
AWS IoTで家庭内IoTをやってみた【JAWS DAYS 2016】AWS IoTで家庭内IoTをやってみた【JAWS DAYS 2016】
AWS IoTで家庭内IoTをやってみた【JAWS DAYS 2016】tsuchimon
 

Semelhante a QML\Qt Quick на практике (20)

Ubuntu app development
Ubuntu app development Ubuntu app development
Ubuntu app development
 
UI Design From Scratch - Part 5 - transcript.pdf
UI Design From Scratch - Part 5 - transcript.pdfUI Design From Scratch - Part 5 - transcript.pdf
UI Design From Scratch - Part 5 - transcript.pdf
 
Creating an Uber Clone - Part XXII.pdf
Creating an Uber Clone - Part XXII.pdfCreating an Uber Clone - Part XXII.pdf
Creating an Uber Clone - Part XXII.pdf
 
I need to create a page looks like a picture. But it looks different.pdf
I need to create a page looks like a picture. But it looks different.pdfI need to create a page looks like a picture. But it looks different.pdf
I need to create a page looks like a picture. But it looks different.pdf
 
Game dev 101 part 3
Game dev 101 part 3Game dev 101 part 3
Game dev 101 part 3
 
Making Games in JavaScript
Making Games in JavaScriptMaking Games in JavaScript
Making Games in JavaScript
 
Creating an Uber Clone - Part XXII - Transcript.pdf
Creating an Uber Clone - Part XXII - Transcript.pdfCreating an Uber Clone - Part XXII - Transcript.pdf
Creating an Uber Clone - Part XXII - Transcript.pdf
 
662305 LAB13
662305 LAB13662305 LAB13
662305 LAB13
 
Yahoo Open Source - The Tour & Mystery of AppDevKit (MOPCON 2016)
Yahoo Open Source - The Tour & Mystery of AppDevKit (MOPCON 2016)Yahoo Open Source - The Tour & Mystery of AppDevKit (MOPCON 2016)
Yahoo Open Source - The Tour & Mystery of AppDevKit (MOPCON 2016)
 
Creating an Uber Clone - Part IV - Transcript.pdf
Creating an Uber Clone - Part IV - Transcript.pdfCreating an Uber Clone - Part IV - Transcript.pdf
Creating an Uber Clone - Part IV - Transcript.pdf
 
UI Design From Scratch - Part 5.pdf
UI Design From Scratch - Part 5.pdfUI Design From Scratch - Part 5.pdf
UI Design From Scratch - Part 5.pdf
 
Creating an Uber Clone - Part XXI.pdf
Creating an Uber Clone - Part XXI.pdfCreating an Uber Clone - Part XXI.pdf
Creating an Uber Clone - Part XXI.pdf
 
Version1.0 StartHTML000000232 EndHTML000065057 StartFragment0000.docx
Version1.0 StartHTML000000232 EndHTML000065057 StartFragment0000.docxVersion1.0 StartHTML000000232 EndHTML000065057 StartFragment0000.docx
Version1.0 StartHTML000000232 EndHTML000065057 StartFragment0000.docx
 
Exploring Canvas
Exploring CanvasExploring Canvas
Exploring Canvas
 
Kotlin Mullets
Kotlin MulletsKotlin Mullets
Kotlin Mullets
 
Synchronizing without internet - Multipeer Connectivity (iOS)
Synchronizing without internet - Multipeer Connectivity (iOS)Synchronizing without internet - Multipeer Connectivity (iOS)
Synchronizing without internet - Multipeer Connectivity (iOS)
 
Applications
ApplicationsApplications
Applications
 
Petri Niemi Qt Advanced Part 2
Petri Niemi Qt Advanced Part 2Petri Niemi Qt Advanced Part 2
Petri Niemi Qt Advanced Part 2
 
AWS IoTで家庭内IoTをやってみた【JAWS DAYS 2016】
AWS IoTで家庭内IoTをやってみた【JAWS DAYS 2016】AWS IoTで家庭内IoTをやってみた【JAWS DAYS 2016】
AWS IoTで家庭内IoTをやってみた【JAWS DAYS 2016】
 
Intro to HTML5
Intro to HTML5Intro to HTML5
Intro to HTML5
 

Mais de Platonov Sergey

Евгений Зуев, С++ в России: Стандарт языка и его реализация
Евгений Зуев, С++ в России: Стандарт языка и его реализацияЕвгений Зуев, С++ в России: Стандарт языка и его реализация
Евгений Зуев, С++ в России: Стандарт языка и его реализацияPlatonov Sergey
 
Использование maven для сборки больших модульных c++ проектов на примере Odin...
Использование maven для сборки больших модульных c++ проектов на примере Odin...Использование maven для сборки больших модульных c++ проектов на примере Odin...
Использование maven для сборки больших модульных c++ проектов на примере Odin...Platonov Sergey
 
Дракон в мешке: от LLVM к C++ и проблемам неопределенного поведения
Дракон в мешке: от LLVM к C++ и проблемам неопределенного поведенияДракон в мешке: от LLVM к C++ и проблемам неопределенного поведения
Дракон в мешке: от LLVM к C++ и проблемам неопределенного поведенияPlatonov Sergey
 
One definition rule - что это такое, и как с этим жить
One definition rule - что это такое, и как с этим житьOne definition rule - что это такое, и как с этим жить
One definition rule - что это такое, и как с этим житьPlatonov Sergey
 
DI в C++ тонкости и нюансы
DI в C++ тонкости и нюансыDI в C++ тонкости и нюансы
DI в C++ тонкости и нюансыPlatonov Sergey
 
Аскетичная разработка браузера
Аскетичная разработка браузераАскетичная разработка браузера
Аскетичная разработка браузераPlatonov Sergey
 
Денис Кормалев Метаобъектная система Qt
Денис Кормалев Метаобъектная система QtДенис Кормалев Метаобъектная система Qt
Денис Кормалев Метаобъектная система QtPlatonov Sergey
 
Максим Хижинский Lock-free maps
Максим Хижинский Lock-free mapsМаксим Хижинский Lock-free maps
Максим Хижинский Lock-free mapsPlatonov Sergey
 
Владислав Шаклеин. Смешивание управляемого и неуправляемого C++ кода в Micros...
Владислав Шаклеин. Смешивание управляемого и неуправляемого C++ кода в Micros...Владислав Шаклеин. Смешивание управляемого и неуправляемого C++ кода в Micros...
Владислав Шаклеин. Смешивание управляемого и неуправляемого C++ кода в Micros...Platonov Sergey
 
High quality library from scratch
High quality library from scratchHigh quality library from scratch
High quality library from scratchPlatonov Sergey
 
С++ without new and delete
С++ without new and deleteС++ without new and delete
С++ without new and deletePlatonov Sergey
 
Categories for the Working C++ Programmer
Categories for the Working C++ ProgrammerCategories for the Working C++ Programmer
Categories for the Working C++ ProgrammerPlatonov Sergey
 
Библиотека Boost с нуля на примере Boost.DLL
Библиотека Boost с нуля на примере Boost.DLLБиблиотека Boost с нуля на примере Boost.DLL
Библиотека Boost с нуля на примере Boost.DLLPlatonov Sergey
 
Оптимизация трассирования с использованием Expression templates
Оптимизация трассирования с использованием Expression templatesОптимизация трассирования с использованием Expression templates
Оптимизация трассирования с использованием Expression templatesPlatonov Sergey
 
Практика Lock-free. RealTime-сервер
Практика Lock-free. RealTime-серверПрактика Lock-free. RealTime-сервер
Практика Lock-free. RealTime-серверPlatonov Sergey
 
С++ without new and delete
С++ without new and deleteС++ without new and delete
С++ without new and deletePlatonov Sergey
 

Mais de Platonov Sergey (17)

Евгений Зуев, С++ в России: Стандарт языка и его реализация
Евгений Зуев, С++ в России: Стандарт языка и его реализацияЕвгений Зуев, С++ в России: Стандарт языка и его реализация
Евгений Зуев, С++ в России: Стандарт языка и его реализация
 
Использование maven для сборки больших модульных c++ проектов на примере Odin...
Использование maven для сборки больших модульных c++ проектов на примере Odin...Использование maven для сборки больших модульных c++ проектов на примере Odin...
Использование maven для сборки больших модульных c++ проектов на примере Odin...
 
Дракон в мешке: от LLVM к C++ и проблемам неопределенного поведения
Дракон в мешке: от LLVM к C++ и проблемам неопределенного поведенияДракон в мешке: от LLVM к C++ и проблемам неопределенного поведения
Дракон в мешке: от LLVM к C++ и проблемам неопределенного поведения
 
One definition rule - что это такое, и как с этим жить
One definition rule - что это такое, и как с этим житьOne definition rule - что это такое, и как с этим жить
One definition rule - что это такое, и как с этим жить
 
DI в C++ тонкости и нюансы
DI в C++ тонкости и нюансыDI в C++ тонкости и нюансы
DI в C++ тонкости и нюансы
 
Аскетичная разработка браузера
Аскетичная разработка браузераАскетичная разработка браузера
Аскетичная разработка браузера
 
Concepts lite
Concepts liteConcepts lite
Concepts lite
 
Денис Кормалев Метаобъектная система Qt
Денис Кормалев Метаобъектная система QtДенис Кормалев Метаобъектная система Qt
Денис Кормалев Метаобъектная система Qt
 
Максим Хижинский Lock-free maps
Максим Хижинский Lock-free mapsМаксим Хижинский Lock-free maps
Максим Хижинский Lock-free maps
 
Владислав Шаклеин. Смешивание управляемого и неуправляемого C++ кода в Micros...
Владислав Шаклеин. Смешивание управляемого и неуправляемого C++ кода в Micros...Владислав Шаклеин. Смешивание управляемого и неуправляемого C++ кода в Micros...
Владислав Шаклеин. Смешивание управляемого и неуправляемого C++ кода в Micros...
 
High quality library from scratch
High quality library from scratchHigh quality library from scratch
High quality library from scratch
 
С++ without new and delete
С++ without new and deleteС++ without new and delete
С++ without new and delete
 
Categories for the Working C++ Programmer
Categories for the Working C++ ProgrammerCategories for the Working C++ Programmer
Categories for the Working C++ Programmer
 
Библиотека Boost с нуля на примере Boost.DLL
Библиотека Boost с нуля на примере Boost.DLLБиблиотека Boost с нуля на примере Boost.DLL
Библиотека Boost с нуля на примере Boost.DLL
 
Оптимизация трассирования с использованием Expression templates
Оптимизация трассирования с использованием Expression templatesОптимизация трассирования с использованием Expression templates
Оптимизация трассирования с использованием Expression templates
 
Практика Lock-free. RealTime-сервер
Практика Lock-free. RealTime-серверПрактика Lock-free. RealTime-сервер
Практика Lock-free. RealTime-сервер
 
С++ without new and delete
С++ without new and deleteС++ without new and delete
С++ without new and delete
 

Último

W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
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
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
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
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
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
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 

Último (20)

W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.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
 
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...
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
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
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
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-...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 

QML\Qt Quick на практике

  • 3.
  • 5. horizontalLayoutWidget->setGeometry(QRect(10, 0, 501, 51)); horizontalLayout = new QHBoxLayout(horizontalLayoutWidget); horizontalLayout->setSpacing(6); horizontalLayout->setContentsMargins(11, 11, 11, 11); horizontalLayout->setContentsMargins(0, 0, 0, 0); pushButton_2 = new QPushButton(horizontalLayoutWidget); horizontalLayout->addWidget(pushButton_2); pushButton_4 = new QPushButton(horizontalLayoutWidget); horizontalLayout->addWidget(pushButton_4); pushButton_3 = new QPushButton(horizontalLayoutWidget); horizontalLayout->addWidget(pushButton_3); pushButton = new QPushButton(horizontalLayoutWidget); horizontalLayout->addWidget(pushButton); horizontalSlider = new QSlider(centralWidget); horizontalSlider->setGeometry(QRect(10, 60, 501, 16)); horizontalSlider->setOrientation(Qt::Horizontal); textEdit = new QTextEdit(centralWidget); textEdit->setGeometry(QRect(20, 90, 481, 201)); MainWindow->setCentralWidget(centralWidget);
  • 6. RowLayout { anchors.horizontalCenter: parent.horizontalCenter anchors.top: parent.top anchors.topMargin: 18 Button { text: qsTr("Button 1") } Button { text: qsTr("Button 2") } Button { text: qsTr("Button 3") } Button { text: qsTr("Button 4") } } Slider { x: 143; y: 57 width: 355; height: 28 } TextArea { x: 142; y: 105 width: 355; height: 150 }
  • 8. QML это JSON-подобный декларативный язык программирования, основанный на JavaScript, использующий С++ API для интеграции с Qt Qt Quick это scenegraph-based UI framework, использующий в качестве языка программирования QML и позиционирующий себя как инструмент для быстрой разработки и прототипирования
  • 9. Где уместно использовать Qt Quick? Там где вы уже используете Qt Там где требуется не стандартный (вычурный) UI Там где необходим кросплатформенный “look and feel” Там где есть постоянно меняющиеся требования к дизайну и бизнес- логике
  • 13. Hello World import QtQuick 2.0 Rectangle { id: root width: 120; height: 240 color: "#D8D8D8" Image { id: world x: (parent.width - width)/2 y: 40 source: 'assets/world.png' } Text { y: world.y + world.height + 20 width: root.width horizontalAlignment: Text.AlignHCenter text: 'Hello World' } }
  • 14. import QtQuick 2.2 Rectangle { id: photo objectName: "photo" property bool thumbnail: false property alias image: photoImage.source signal clicked(); color: "gray" x: 20; y: 20 height: 150 width: { if(photoImage.width > 200) { photoImage.width; } else { 200; } } function doSomething(dx) { return dx + photoImage.width; } onHeightChanged: { var tmp = doSomething(photo.height); console.log( tmp ); } QtObject { id: p_attr readonly property color borderSelectedColor: "red" readonly property color borderUnSelectedColor: "black" property int animationDuration: 200 } Rectangle { id: border anchors.centerIn: parent Image { id: photoImage; anchors.centerIn: parent } } MouseArea { anchors.fill: parent onClicked: photo.clicked(); } states:[ State { name: "Selected" PropertyChanges { target: border; color: p_attr.borderSelectedColor } }, State { name: "UnSelected" PropertyChanges { target: border; color: p_attr.borderUnSelectedColor } } ] transitions: Transition { to: "Selected" ColorAnimation { target: border; duration: p_attr.animationDuration } } }
  • 15. import QtQuick 2.2 Rectangle { id: photo objectName: "photo" property bool thumbnail: false property alias image: photoImage.source signal clicked(); color: "gray" x: 20; y: 20 height: 150 width: { if(photoImage.width > 200) { photoImage.width; } else { 200; } } function doSomething(dx) { return dx + photoImage.width; } onHeightChanged: { var tmp = doSomething(photo.height); console.log( tmp ); } QtObject { id: p_attr readonly property color borderSelectedColor: "red" readonly property color borderUnSelectedColor: "black" property int animationDuration: 200 } Rectangle { id: border anchors.centerIn: parent Image { id: photoImage; anchors.centerIn: parent } } MouseArea { anchors.fill: parent onClicked: photo.clicked(); } states:[ State { name: "Selected" PropertyChanges { target: border; color: p_attr.borderSelectedColor } }, State { name: "UnSelected" PropertyChanges { target: border; color: p_attr.borderUnSelectedColor } } ] transitions: Transition { to: "Selected" ColorAnimation { target: border; duration: p_attr.animationDuration } } }
  • 16. import QtQuick 2.2 Rectangle { id: photo objectName: "photo" property bool thumbnail: false property alias image: photoImage.source signal clicked(); color: "gray" x: 20; y: 20 height: 150 width: { if(photoImage.width > 200) { photoImage.width; } else { 200; } } function doSomething(dx) { return dx + photoImage.width; } onHeightChanged: { var tmp = doSomething(photo.height); console.log( tmp ); } QtObject { id: p_attr readonly property color borderSelectedColor: "red" readonly property color borderUnSelectedColor: "black" property int animationDuration: 200 } Rectangle { id: border anchors.centerIn: parent Image { id: photoImage; anchors.centerIn: parent } } MouseArea { anchors.fill: parent onClicked: photo.clicked(); } states:[ State { name: "Selected" PropertyChanges { target: border; color: p_attr.borderSelectedColor } }, State { name: "UnSelected" PropertyChanges { target: border; color: p_attr.borderUnSelectedColor } } ] transitions: Transition { to: "Selected" ColorAnimation { target: border; duration: p_attr.animationDuration } } }
  • 17. import QtQuick 2.2 Rectangle { id: photo objectName: "photo" property bool thumbnail: false property alias image: photoImage.source signal clicked(); color: "gray" x: 20; y: 20 height: 150 width: { if(photoImage.width > 200) { photoImage.width; } else { 200; } } function doSomething(dx) { return dx + photoImage.width; } onHeightChanged: { var tmp = doSomething(photo.height); console.log( tmp ); } QtObject { id: p_attr readonly property color borderSelectedColor: "red" readonly property color borderUnSelectedColor: "black" property int animationDuration: 200 } Rectangle { id: border anchors.centerIn: parent Image { id: photoImage; anchors.centerIn: parent } } MouseArea { anchors.fill: parent onClicked: photo.clicked(); } states:[ State { name: "Selected" PropertyChanges { target: border; color: p_attr.borderSelectedColor } }, State { name: "UnSelected" PropertyChanges { target: border; color: p_attr.borderUnSelectedColor } } ] transitions: Transition { to: "Selected" ColorAnimation { target: border; duration: p_attr.animationDuration } } }
  • 18. import QtQuick 2.2 Rectangle { id: photo objectName: "photo" property bool thumbnail: false property alias image: photoImage.source signal clicked(); color: "gray" x: 20; y: 20 height: 150 width: { if(photoImage.width > 200) { photoImage.width; } else { 200; } } function doSomething(dx) { return dx + photoImage.width; } onHeightChanged: { var tmp = doSomething(photo.height); console.log( tmp ); } QtObject { id: p_attr readonly property color borderSelectedColor: "red" readonly property color borderUnSelectedColor: "black" property int animationDuration: 200 } Rectangle { id: border anchors.centerIn: parent Image { id: photoImage; anchors.centerIn: parent } } MouseArea { anchors.fill: parent onClicked: photo.clicked(); } states:[ State { name: "Selected" PropertyChanges { target: border; color: p_attr.borderSelectedColor } }, State { name: "UnSelected" PropertyChanges { target: border; color: p_attr.borderUnSelectedColor } } ] transitions: Transition { to: "Selected" ColorAnimation { target: border; duration: p_attr.animationDuration } } }
  • 19. import QtQuick 2.2 Rectangle { id: photo objectName: "photo" property bool thumbnail: false property alias image: photoImage.source signal clicked(); color: "gray" x: 20; y: 20 height: 150 width: { if(photoImage.width > 200) { photoImage.width; } else { 200; } } function doSomething(dx) { return dx + photoImage.width; } onHeightChanged: { var tmp = doSomething(photo.height); console.log( tmp ); } QtObject { id: p_attr readonly property color borderSelectedColor: "red" readonly property color borderUnSelectedColor: "black" property int animationDuration: 200 } Rectangle { id: border anchors.centerIn: parent Image { id: photoImage; anchors.centerIn: parent } } MouseArea { anchors.fill: parent onClicked: photo.clicked(); } states:[ State { name: "Selected" PropertyChanges { target: border; color: p_attr.borderSelectedColor } }, State { name: "UnSelected" PropertyChanges { target: border; color: p_attr.borderUnSelectedColor } } ] transitions: Transition { to: "Selected" ColorAnimation { target: border; duration: p_attr.animationDuration } } }
  • 20. import QtQuick 2.2 Rectangle { id: photo objectName: "photo" property bool thumbnail: false property alias image: photoImage.source signal clicked(); color: "gray" x: 20; y: 20 height: 150 width: { if(photoImage.width > 200) { photoImage.width; } else { 200; } } function doSomething(dx) { return dx + photoImage.width; } onHeightChanged: { var tmp = doSomething(photo.height); console.log( tmp ); } QtObject { id: p_attr readonly property color borderSelectedColor: "red" readonly property color borderUnSelectedColor: "black" property int animationDuration: 200 } Rectangle { id: border anchors.centerIn: parent Image { id: photoImage; anchors.centerIn: parent } } MouseArea { anchors.fill: parent onClicked: photo.clicked(); } states:[ State { name: "Selected" PropertyChanges { target: border; color: p_attr.borderSelectedColor } }, State { name: "UnSelected" PropertyChanges { target: border; color: p_attr.borderUnSelectedColor } } ] transitions: Transition { to: "Selected" ColorAnimation { target: border; duration: p_attr.animationDuration } } }
  • 21. import QtQuick 2.2 Rectangle { id: photo objectName: "photo" property bool thumbnail: false property alias image: photoImage.source signal clicked(); color: "gray" x: 20; y: 20 height: 150 width: { if(photoImage.width > 200) { photoImage.width; } else { 200; } } function doSomething(dx) { return dx + photoImage.width; } onHeightChanged: { var tmp = doSomething(photo.height); console.log( tmp ); } QtObject { id: p_attr readonly property color borderSelectedColor: "red" readonly property color borderUnSelectedColor: "black" property int animationDuration: 200 } Rectangle { id: border anchors.centerIn: parent Image { id: photoImage; anchors.centerIn: parent } } MouseArea { anchors.fill: parent onClicked: photo.clicked(); } states:[ State { name: "Selected" PropertyChanges { target: border; color: p_attr.borderSelectedColor } }, State { name: "UnSelected" PropertyChanges { target: border; color: p_attr.borderUnSelectedColor } } ] transitions: Transition { to: "Selected" ColorAnimation { target: border; duration: p_attr.animationDuration } } }
  • 22. import QtQuick 2.2 Rectangle { id: photo objectName: "photo" property bool thumbnail: false property alias image: photoImage.source signal clicked(); color: "gray" x: 20; y: 20 height: 150 width: { if(photoImage.width > 200) { photoImage.width; } else { 200; } } function doSomething(dx) { return dx + photoImage.width; } onHeightChanged: { var tmp = doSomething(photo.height); console.log( tmp ); } QtObject { id: p_attr readonly property color borderSelectedColor: "red" readonly property color borderUnSelectedColor: "black" property int animationDuration: 200 } Rectangle { id: border anchors.centerIn: parent Image { id: photoImage; anchors.centerIn: parent } } MouseArea { anchors.fill: parent onClicked: photo.clicked(); } states:[ State { name: "Selected" PropertyChanges { target: border; color: p_attr.borderSelectedColor } }, State { name: "UnSelected" PropertyChanges { target: border; color: p_attr.borderUnSelectedColor } } ] transitions: Transition { to: "Selected" ColorAnimation { target: border; duration: p_attr.animationDuration } } }
  • 23. // Circle.qml import QtQuick 2.0 Rectangle { property real diameter : 30 width: diameter height: diameter radius: diameter } import QtQuick 2.0 Rectangle { width: 120; height: 240 Column { anchors.fill: parent Repeater { model: 3 Circle { color: "blue" diameter: 90 } } } }
  • 25. Якоря бывают двух видов: -ссылающиеся на элемент (centerIn, fill) -ссылающиеся на другой якорь ( left, right, top, bottom, …. )
  • 26. import QtQuick 2.0 Rectangle { id: root width: 120; height: 240 color: "#D8D8D8" Image { id: world anchors.horizontalCenter: parent.horizontalCenter anchors.top: parent.top anchors.topMargin: 40 source: 'assets/world.png' } Text { anchors.top: world.bottom anchors.topMargin: 20 anchors.horizontalCenter: world.horizontalCenter text: 'Hello World' } } Hello World
  • 28. С++ API позволяет: – экспортировать в QML C++ обьекты наследованные от QObject – экспортировать в QML не визуальные типы – классы на основе QQuickPaintedItem для визуальных элементов с поддержкой QPainter – классы на основе QQuickItem для визуальных элементов сцены
  • 30. class User : public QObject { Q_OBJECT Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged) Q_PROPERTY(int age READ age WRITE setAge NOTIFY ageChanged) public: User(const QString &name, int age, QObject *parent = 0); ... }
  • 31. void main( int argc, char* argv[] ) { ... User *currentUser = new User("Alice", 29); QQuickView *view = new QQuickView; QQmlContext *context = view->engine()->rootContext(); context->setContextProperty("currentUser", currentUser); ... }
  • 32. void main( int argc, char* argv[] ) { ... User *currentUser = new User("Alice", 29); QQuickView *view = new QQuickView; QQmlContext *context = view->engine()->rootContext(); context->setContextProperty("currentUser", currentUser); ... } Text { text : currentUser.name }
  • 34. #include <QObject> class CustomTimer : public QObject { Q_OBJECT Q_PROPERTY( int interval READ interval WRITE setInterval NOTIFY intervalChanged ) public: CustomTimer(QObject *parent = 0); int interval() const; public slots: void start(); void stop(); void setInterval(int arg); signals: void intervalChanged(int arg); void timeout(); private: QTimer* m_timer; int m_interval; };
  • 35. #include <QGuiApplication> #include <QQuickView> #include "CustomTimer.h" int main(int argc, char *argv[]) { QGuiApplication app(argc, argv); qmlRegisterType<CustomTimer>("CustomComponents", 1, 0, "CustomTimer"); QQuickView view; view.setSource(QUrl("qrc:///main.qml")); view.show(); return app.exec(); }
  • 36. import CustomComponents 1.0 Rectangle { id: root Component.onCompleted: { timer.start(); } …….. CustomTimer { id: timer interval: 3000 onTimeout: { console.log( "Timer timeout!" ); root.color = "red"; } } }
  • 38. #include <QQuickPaintedItem> class EllipseItem : public QQuickPaintedItem { Q_OBJECT public: EllipseItem(QQuickItem *parent = 0); void paint(QPainter *painter); }; void EllipseItem::paint(QPainter *painter) { const qreal halfPenWidth = qMax(painter->pen().width() / 2.0, 1.0); QRectF rect = boundingRect(); rect.adjust(halfPenWidth, halfPenWidth, -halfPenWidth, -halfPenWidth); painter->drawEllipse(rect); }
  • 39. #include <QGuiApplication> #include <QQuickView> #include "EllipseItem.h" int main(int argc, char *argv[]) { QGuiApplication app(argc, argv); qmlRegisterType<EllipseItem>("CustomComponents", 1, 0, "Ellipse"); QQuickView view; view.setSource(QUrl("qrc:///main.qml")); view.show(); return app.exec(); }
  • 40. import CustomComponents 1.0 Rectangle { id: root EllipseItem { anchors.centerIn: parent width: 64 height: 48 } }
  • 42. #include <QQuickItem> #include <QSGGeometry> #include <QSGFlatColorMaterial> class TriangleItem : public QQuickItem { Q_OBJECT public: TriangleItem(QQuickItem *parent = 0); protected: QSGNode *updatePaintNode(QSGNode *node, UpdatePaintNodeData *data); private: QSGGeometry m_geometry; QSGFlatColorMaterial m_material; };
  • 43. QSGNode *TriangleItem::updatePaintNode(QSGNode *n, UpdatePaintNodeData *) { QSGGeometryNode *node = static_cast<QSGGeometryNode *>(n); if (!node) node = new QSGGeometryNode(); QSGGeometry::Point2D *v = m_geometry.vertexDataAsPoint2D(); const QRectF rect = boundingRect(); v[0].x = rect.left(); v[0].y = rect.bottom(); v[1].x = rect.left() + rect.width()/2; v[1].y = rect.top(); v[2].x = rect.right(); v[2].y = rect.bottom(); node->setGeometry(&m_geometry); node->setMaterial(&m_material); return node; }
  • 44. QSGNode * QQuickCustomItem::updatePaintNode(QSGNode * node, UpdatePaintNodeData * nodedata) { TexureHolderNode * texture_node = static_cast<TexureHolderNode *>(node); if (!texture_node) texture_node = new TexureHolderNode(); if (texture_node->fbo_ && (texture_node->fbo_->width() != width() || texture_node->fbo_->height() != height())) { texture_node->fbo_.reset(); } if (texture_node->fbo_.isNull()) { QSize fboSize(qMax<int>(1, int(width())), qMax<int>(1, int(height()))); QOpenGLFramebufferObjectFormat format; texture_node->fbo_.reset(new QOpenGLFramebufferObject(fboSize, format)); texture_node->setTexture( window()->createTextureFromId( texture_node->fbo_->texture(), texture_node->fbo_->size(), 0) ); texture_node->setRect(0, 0, width(), height()); redraw_texture_needed_ = true; } if (redraw_texture_needed_) { redraw_texture_needed_ = false; texture_node->fbo_->bind(); { paintGL(); } texture_node->fbo_->bindDefault(); texture_node->markDirty(QSGNode::DirtyMaterial); } return texture_node; } class TexureHolderNode : public QSGSimpleTextureNode { public: TexureHolderNode() {} QScopedPointer<QOpenGLFramebufferObject> fbo_; };
  • 45.
  • 47. Что нужно оставлять в плюсах, что лучше перенести в QML?
  • 49. Autopilot-Qt5QtCreator GammaRay Squish – qt.io/ru/download-open-source – kdab.com/gammaray – froglogic.com/squish – wiki.ubuntu.com/Touch/Testing/Autopilot