User Interface Programming Qt

Total Page:16

File Type:pdf, Size:1020Kb

User Interface Programming Qt User Interface Programming Qt Jozef Mlích Department of Computer Graphics and Multimedia Faculty of Information Technology, Brno University of Technology Božetěchova 2, 612 66 Brno, Czech Republic http://www.fit.vutbr.cz/~imlich [email protected] http://www.fit.vutbr.cz/~imlich/ 10.10.2014Qt | 1 / 28 http://www.fit.vutbr.cz/~imlich/ Qt | 2 / 28 Agenda Motivation, Features, History ? (1991-NOW) Architecture of Qt – qmake, other tools – QObject (Meta object model, Events, Signals and slots, Properties, Memory management) – Layouts QML – MVC Advanced topics – C++ and QML – Shaders http://www.fit.vutbr.cz/~imlich/ Qt | 3 / 28 Who is using Qt? Skype for Linux Team Speak Google Earth Autodesk Maya Guitar Pro 6 VLC player GNU Octave OpenSCAD http://www.fit.vutbr.cz/~imlich/ Qt | 4 / 28 Features C++, Python, C#, (Java – Jambi) API for everything (not only GUI) cross-platform – Windows – Mac – Linux – Embedded systems (via “frame buffer”, Qt on Pi) – Mobile devices (Symbian, Maemo, MeeGo, Jolla, Blackberry, Android, iOS) Licence – GPL, LGPL, Commercial http://www.fit.vutbr.cz/~imlich/ Qt | 5 / 28 Architecture http://www.fit.vutbr.cz/~imlich/ Qt | 6 / 28 Compilation and tools qmake, moc, uic cmake, automoc Qt Creator, Qt Linguist, Qt Designer, qmlviewer/qmlscene http://www.fit.vutbr.cz/~imlich/ Qt | 7 / 28 Meta object compiler Qt extends C++ - macro language, introspection, etc. – foreach (int value, intList) { ... } // (i.e. Q_FOREACH) – QObject *o = new QPushButton; o->metaObject()->className(); //returns ”QPushButton”// introspection – connect(button, SIGNAL(clicked()), window, SLOT(close())); It is still C++ QObject – Events class MyClass : public QObject – Signals and slots { Q_OBJECT – “Properties” public: – Memory managenet MyClass(QObject *parent = 0); ~MyClass(); signals: void mySignal(int); public slots: void mySlot(int); }; http://www.fit.vutbr.cz/~imlich/ Qt | 8 / 28 Memory management Sample Code QObject *parent = new QObject(); QObject *child1 = new QObject(parent); QObject *child2 = new QObject(parent); QObject *child1_1 = new QObject(child1); QObject *child1_2 = new QObject(child1); delete parent; This is used when implementing visual hierarchies. Heap memory is explicitly allocated and freed using new and delete Local variables are allocated on Stack http://www.fit.vutbr.cz/~imlich/ Qt | 9 / 28 Signals and slots A “callback” (in other tool kits) is a pointer to a function that is called when an event occurs, any function can be assigned to a callback – No type-safety – Always works as a direct call Signals and Slots are more dynamic – A more generic mechanism – Easier to interconnect two existing classes – Less knowledge shared between involved classes http://www.fit.vutbr.cz/~imlich/ Qt | 10 / 28 Widget Widget is basic graphical primitive in Qt Objects are in Tree Hierarchy Its behavior is given by it source code and by inheritance. (Almost) Every visual object is child QWidget in terms of inheritance http://www.fit.vutbr.cz/~imlich/ Qt | 11 / 28 Object positioning Layouts – mostly used Absolute position – “easy way” Anchors ... http://www.fit.vutbr.cz/~imlich/ Qt | 12 / 28 Resources Used for data embedded into the executable file – Images – Icons – Sounds – (QML Source code) QUrl(QLatin1String("qrc:/camera-icon.png")); http://www.fit.vutbr.cz/~imlich/ Qt | 13 / 28 Properties Sample Code class QLabel : public QFrame { Q_OBJECT Q_PROPERTY(QString text READ text WRITE setText) public: QString text() const; public slots: void setText(const QString &); }; Why Setters/Getters? – Possible to validate values or to react to changes – Indirect properties (i.e. return m_size.width();) – Qml Q_PROPERTY(type name READ getFunction [WRITE setFunction] [RESET resetFunction] [NOTIFY notifySignal] [DESIGNABLE bool] [SCRIPTABLE bool] [STORED bool] [USER bool] [CONSTANT] [FINAL]) http://www.fit.vutbr.cz/~imlich/ Qt | 14 / 28 Qt Quick QML = language Qt Declarative = Qt module import QtQuick 2.0 Rectangle { width: 360 height: 360 Text { text: qsTr("Hello World") anchors.centerIn: parent } MouseArea { anchors.fill: parent onClicked: { Qt.quit(); } } } http://www.fit.vutbr.cz/~imlich/ Qt | 15 / 28 Hello QML – tree hierarchy import QtQuick 2.0 Rectangle { Text { } MouseArea { } Rectangle { Rectangle { Rectangle { } Rectangle { } Rectangle { } } } http://www.fit.vutbr.cz/~imlich/ Qt | 16 / 28 Hello QML – properties import QtQuick 2.0 Rectangle { Text { width: 360; // value height: width/2; // expression text: qsTr("Hello World") // calling function } } Cloud contain value / expression / code What is qtTr()? – See Internalization and Localization section of manual. http://www.fit.vutbr.cz/~imlich/ Qt | 17 / 28 Hello QML – properties complex code import QtQuick 2.0 Rectangle { Text { id: myText; text: “default value”; anchors.fill: parent; } Component.onCompleted: { myText.text = “new value”; } } ID and PARENT are special. Terminology: – Class starts with Uppercase letter – e.g. Rectangle, Text – Property with lowercase – e.g. width, id, text – Code is javascript (almost C) http://www.fit.vutbr.cz/~imlich/ Qt | 18 / 28 Hello QML – function and own properties import QtQuick 2.0 Rectangle { property double myValue: 7.3; Rectangle { x: 10; y: 10; width: 10; height: 10; color: getColor(myValue); } function getColor(v) { if (v < 10) { return “#ff0000”; } return “#00ff00”; } } Basic types – int, bool, real, double, string, url, list, variant, var – color, vector2d, vector3d, date, rect, size http://www.fit.vutbr.cz/~imlich/ Qt | 19 / 28 Hello QML – build in classes See http://qt-project.org/doc/qt-5/qtquick-index.html Item, Component Visual – Rectangle { color: “red”; } – Image { source: “image.png”; } – Text { text: “hello world”; } Non visual – MouseArea { anchors.fill: <itemId>; onClicked: { console.log(“hello world”); } } – TextInput { text: “”; } ListModel, ListElement http://www.fit.vutbr.cz/~imlich/ Qt | 20 / 28 Hello QML – inheritance MyRectangle.qml Rectangle { x: 10; y: 10; width: 10; height: 10; color: “red”; } ... import “directory or namespace” MyRectangle { // color, x, and y are given by inheritance height: 100; // height and width are overriden width: 100; } http://www.fit.vutbr.cz/~imlich/ Qt | 21 / 28 Design pattern MVC Model / View / Controller Delegate import QtQuick 2.0 import QtQuick 2.0 import QtQml.Models 2.0 ListView { ListModel { width: 180; height: 200 ListElement { model: ContactModel {} name: "Bill Smith" delegate: Text { number: "555 3264" text: name + ": " + number } } ListElement { } name: "John Brown" number: "555 8426" } ListElement { name: "Sam Wise" number: "555 0473" } } http://www.fit.vutbr.cz/~imlich/ Qt | 22 / 28 QML and C++ class MyCppObject { Q_PROPERTY(QString foo ............) Q_INVOKABLE void bar( QString ); .... }; qmlRegisterType<MyCppObject>("my.namespace", 1, 0, "MyQMLObject"); engine.rootContext()->setContextProperty( "_network_controler", &network_controler ); import my.namespace 1.0 MyQMLObject { id: myObj; foo: “string”; } Component.onCompleted: { console.log(myObj.bar()) } http://www.fit.vutbr.cz/~imlich/ Qt | 23 / 28 Computer Exercise Calculator with benefits What do we use? – UI with Qt Quick – MVC – Connection of C++ and QML What do we get? – knowledge – 5 points http://www.fit.vutbr.cz/~imlich/ Qt | 24 / 28 Computer Exercise – TODO Warm up – Download skeleton – Run Qt Creator IDE – Run skeleton Add operation of multiplication and division (1pt) Tune MyClickButton class. – The text should be in the center of the element (1pt) – The button should change color when clicked (1pt) Incorporate misterious transformation – Use the Look Up Table implmented in C++ (1pt) Compute result (1pt) – Fix switch / case. – Include all above. http://www.fit.vutbr.cz/~imlich/ Qt | 25 / 28 Shaders Here comes magic! Using OpenGL for “advanced effects”. – Cinematic experience – http://mynokiablog.com/2011/05/03/qt-quick-shader-effects- running-on-a-nokia-n8-symbian3-maemo-5-mac-os-x- windows-7-and-ubuntu/ – http://www.youtube.com/watch?v=dzHGILAG68g http://www.fit.vutbr.cz/~imlich/ Qt | 26 / 28 References http://qt-project.org/ http://qt-project.org/doc/ Reference manual http://qmlbook.org/ IRC: #qt and #qt-qml at freenode Fitzek, Frank H. P., Tommi Mikkonen, and Tony Torp. Qt for Symbian. John Wiley and Sons, 2010. Molkentin, D: The Book of Qt 4: The Art of Building Qt Applications, No Starch Press, 2007, 440p, ISBN10: 1593271476, ISBN13: 978159327147 http://www.fit.vutbr.cz/~imlich/ Qt | 27 / 28 Questions ? http://www.fit.vutbr.cz/~imlich/ Qt | 28 / 28 .
Recommended publications
  • Qt5 Cadaques Release 2017-12
    Qt5 Cadaques Release 2017-12 JRyannel,JThelin Januar 26, 2018 at 22:39 CET Inhaltsverzeichnis 1 Meet Qt 5 3 1.1 Preface................................................3 1.2 Qt 5 Introduction...........................................4 1.3 Qt Building Blocks..........................................8 1.4 Qt Project............................................... 10 2 Get Started 11 2.1 Installing Qt 5 SDK......................................... 11 2.2 Hello World............................................. 11 2.3 Application Types.......................................... 13 2.4 Summary............................................... 21 3 Qt Creator IDE 23 3.1 The User Interface.......................................... 23 3.2 Registering your Qt Kit....................................... 24 3.3 Managing Projects.......................................... 24 3.4 Using the Editor........................................... 25 3.5 Locator................................................ 25 3.6 Debugging.............................................. 26 3.7 Shortcuts............................................... 26 4 Quick Starter 27 4.1 QML Syntax............................................. 27 4.2 Basic Elements............................................ 32 4.3 Components............................................. 36 4.4 Simple Transformations....................................... 39 4.5 Positioning Elements......................................... 42 4.6 Layout Items............................................. 46 4.7 Input Elements...........................................
    [Show full text]
  • Qt Framework
    About Qt Qt is a framework to develop cross-platform applications. Currently, the supported platforms are Windows, Linux, macOS, Android, iOS, Embedded Linux and some others. Genarally, it means that the programmer may develop the code on one platform but compile, link and run it on another platform. But it also means that Qt needs help: to develop software it must cooperate with development tools on specific platforms, for example in case of Windows with Visual Studio. Qt is well-known for its tools for developing graphical user interfaces (GUI) , but it also provides powerful tools for threads, networking and communication (Bluetooth, serial port, web), 3D graphics, multimedia, SQL databases, etc. Qt has its own Integrated Development Environment (IDE): QtCreator. History: 1991: version 1.0 as cross-platform GUI programming toolkit was developed and implemented by TrollTech (Norway). 2005: version 4.0 was a big step ahead but the compatibility with older versions was lost. 2008: TrollTech was sold to Nokia. 2012: Nokia Qt division was sold to Digia (Finland). 2014: Digia transferred the Qt business to Qt Company. The latest Long Term Support (LTS) version is 5.12. Official website: https://www.qt.io/ Installation The link is https://www.qt.io/download. Select the non-commercial and open source version. It may be possible that you must register yourself creating a new passworded account. Select the latest stable release and the C/C++ development system(s) you are going to use. Tip: the Qt installer proposes to store the stuff in folder C:\Qt. To avoid later complications, agree.
    [Show full text]
  • C++ GUI Programming with Qt 4, Second Edition by Jasmin Blanchette; Mark Summerfield
    C++ GUI Programming with Qt 4, Second Edition by Jasmin Blanchette; Mark Summerfield Publisher: Prentice Hall Pub Date: February 04, 2008 Print ISBN-10: 0-13-235416-0 Print ISBN-13: 978-0-13-235416-5 eText ISBN-10: 0-13-714397-4 eText ISBN-13: 978-0-13-714397-9 Pages: 752 Table of Contents | Index Overview The Only Official, Best-Practice Guide to Qt 4.3 Programming Using Trolltech's Qt you can build industrial-strength C++ applications that run natively on Windows, Linux/Unix, Mac OS X, and embedded Linux without source code changes. Now, two Trolltech insiders have written a start-to-finish guide to getting outstanding results with the latest version of Qt: Qt 4.3. Packed with realistic examples and in-depth advice, this is the book Trolltech uses to teach Qt to its own new hires. Extensively revised and expanded, it reveals today's best Qt programming patterns for everything from implementing model/view architecture to using Qt 4.3's improved graphics support. You'll find proven solutions for virtually every GUI development task, as well as sophisticated techniques for providing database access, integrating XML, using subclassing, composition, and more. Whether you're new to Qt or upgrading from an older version, this book can help you accomplish everything that Qt 4.3 makes possible. • Completely updated throughout, with significant new coverage of databases, XML, and Qtopia embedded programming • Covers all Qt 4.2/4.3 changes, including Windows Vista support, native CSS support for widget styling, and SVG file generation • Contains
    [Show full text]
  • Qt-Käyttöliittymäkirjasto
    Qt-käyttöliittymäkirjasto Matti Lehtinen [email protected] 26.11.2007 Tiivistelmä Tässä raportissa tarkastellaan Qt-käyttöliittymäkirjastoa ja sen käyt- töä C++-kielellä. Raportissa tarkastellaan ensiksi Qt:n ominaisuuksia, mukana tulevia kirjastoja ja työkaluja, sekä kääntämistä. Qt:n käyt- töä tarkastellaan Qt:n tapahtumienkäsittelymekanismin kautta pienen esimerkkikoodin avulla. 1 Johdanto Graasten sovellusten tekeminen useammille käyttöjärjestelmille on usein vaikeaa, sillä kielestä riippuen pahimmassa tapauksessa sovelluksen lähde- koodi joudutaan osittain kirjoittamaan uudestaan vastaamaan kohdekäyttö- järjestelmien rajapintoja. Toinen helpompi ratkaisu on käyttää kieliä, joita voidaan emuloida tai ajaa prosessikohtaisessa virtuaalikoneessa. Tällöin kui- tenkin joudutaan hieman luopumaan suoritustehosta ja lisäksi käyttöjärjes- telmään yleensä joudutaan asentamaan tarvittavat virtuaalikoneet, emulaat- torit tai muut sovellukseen ajoon tarvittavat työkalut. Trolltech yritys tuo oman ratkaisun cross-platform-sovellusten kehittä- misongelmaan Qt-käyttöliittymäkirjaston muodossa. Qt:lla voi helposti tehdä tehokkaita natiiveja sovelluksia useammille käyttöjärjestelmille kirjoittamal- la vain yhden yhteisen lähdekoodin [1]. Sovellusten kirjoittaminen on helppoa intuitiivisen ja monipuolisen rajapinnan avulla. Lisäksi Qt:n yksinkertainen signal-slot-mekanismi tekee tapahtumienkäsittelyn turvalliseksi ja helpoksi. 2 Qt yleisesti Qt on norjalaisen Trolltech-yrityksen kehittämä useammalla käyttöjärjes- telmällä toimiva graanen käyttöliittymäkirjasto.
    [Show full text]
  • KDE 2.0 Development
    00 8911 FM 10/16/00 2:09 PM Page i KDE 2.0 Development David Sweet, et al. 201 West 103rd St., Indianapolis, Indiana, 46290 USA 00 8911 FM 10/16/00 2:09 PM Page ii KDE 2.0 Development ASSOCIATE PUBLISHER Michael Stephens Copyright © 2001 by Sams Publishing This material may be distributed only subject to the terms and conditions set ACQUISITIONS EDITOR forth in the Open Publication License, v1.0 or later (the latest version is Shelley Johnston presently available at http://www.opencontent.org/openpub/). DEVELOPMENT EDITOR Distribution of the work or derivative of the work in any standard (paper) book Heather Goodell form is prohibited unless prior permission is obtained from the copyright holder. MANAGING EDITOR No patent liability is assumed with respect to the use of the information con- Matt Purcell tained herein. Although every precaution has been taken in the preparation of PROJECT EDITOR this book, the publisher and author assume no responsibility for errors or omis- Christina Smith sions. Neither is any liability assumed for damages resulting from the use of the information contained herein. COPY EDITOR International Standard Book Number: 0-672-31891-1 Barbara Hacha Kim Cofer Library of Congress Catalog Card Number: 99-067972 Printed in the United States of America INDEXER Erika Millen First Printing: October 2000 PROOFREADER 03 02 01 00 4 3 2 1 Candice Hightower Trademarks TECHNICAL EDITOR Kurt Granroth All terms mentioned in this book that are known to be trademarks or service Matthias Ettrich marks have been appropriately capitalized. Sams Publishing cannot attest to Kurt Wall the accuracy of this information.
    [Show full text]
  • ES3 Lecture 11 Qt + Maemo Development Maemo
    ES3 Lecture 11 Qt + Maemo development Maemo • Nokia's Linux based platform ▫ Almost entirely open source ▫ Nokia N770, N800, N810, N900 only models ▫ Only N900 has 3G/phone capability • N900 has relatively fast ARM CPU, GPU acceleration ▫ resistive touch screen -- so no multitouch • Development is very flexible ▫ C, C++, Java, Python, Ruby, Lua, Lisp, whatever you want Maemo development • Can develop on the device itself ▫ e.g. using gcc (but not really practical for big projects -- too slow and memory intensive) ▫ or just copy over python scripts and running them... • Scratchbox provides a Linux -based cross -compilation toolkit ▫ Makes it easy to develop on a Linux system and target for Maemo ▫ Only available for Linux though, and a bit tricky to set up • Maemo emulator available as part of the API ▫ Runs in virtual machine • Development can be very straightforward ▫ e.g. ssh into device to execute and debug ▫ files can be directly shared, so you can edit files on the device transparently Maemo Development (II) • Maemo uses a derivative of Debian ▫ Many standard libraries and utilities are present ▫ Porting new libraries is often feasible as well • The Maemo UI is currently a custom UI built on GTK+ (Hildon) ▫ adds "finger-friendly" extensions ▫ supports a simple desktop environment control panel, application manager ▫ some common widgets for mobile systems implemented • But Nokia will be moving to Qt across all their platforms shortly The Qt framework • Qt is a full object-oriented framework with extensive GUI support ▫ Written in
    [Show full text]
  • Graphical Interfaces in Qt
    graphical interfaces in Qt Eric Lecolinet - Télécom ParisTech www.telecom-parist.fr/~elc 2020 Eric Lecolinet - Télécom ParisTech - Qt et graphique interactif Filière IGR and IGD Master http://www.telecom-paris.fr/~elc/igr/ http://www.telecom-paristech.fr/~elc/ Eric Lecolinet - Télécom ParisTech - Qt et graphique interactif http://www.telecom-paris.fr/~elc/igr 3 Filière IGR (2a + 3a) comporte des informations sur la 3e année et les séjours http://www.telecom-paristech.fr/~elc/igr/ à l'étranger ! Eric Lecolinet - Télécom ParisTech - Qt et graphique interactif 4 IGR201b: Interactive 2D/Mobile/Web development IGR201a: Interactive 3D application development - Basic digital imaging - OpenGL IGR201b - Qt GUI toolkit - Android - Web interface basics http://www.telecom-paristech.fr/~elc/igr201/ Eric Lecolinet - Télécom ParisTech - Qt et graphique interactif 5 Qt ("cute") A versatile environnement including - A powerful cross-platform graphical toolkit (including iOS and Android) - A large set of libraries - Used in various open-source or commercial products Dual-licensed - LGPL licence (free): open-source code, student/academic/hobby projects, etc. - Commercial licence: for companies Eric Lecolinet - Télécom ParisTech - Qt et graphique interactif 6 Qt WebEngine WidgetsThe Qt WebEngine Widgets module provides a web browser engine as well as C++ classes to render and interact with web content. Qt WebKit Widgets The Qt WebKit Widgets module provides a web browser engine as well as C++ classes to render and interact with web content. Qt3DCore Qt3D
    [Show full text]
  • CS2141 - Software Development Using C/C++ What Is Qt?
    QT CS2141 - Software Development using C/C++ What Is Qt? Pronounced “cute” C++ Toolkit for GUI Building Uses native APIs to draw controls Runs on Linux/X11, OS X, Windows, mobile platforms Designed to write once, compile anywhere Has bindings for many languages, including Java Where’s Qt Used? Google Earth Skype Mathematica (on OS X and Linux) KDE History of Qt Development began in 1991 Developed by TrollTech First two versions had two flavors: Qt/X11 - QPL or proprietary license Qt/Windows - only available under proprietary license KDE 1.0 Released in 1998 More History Major concern that KDE depended on non-free tech Harmony toolkit - compatible with Qt but free GNOME 2000 - Qt/X11 released under GPL2 2001 - Qt 3 with (proprietary only) OS X support 2003 - Qt 3.2 - OS X version available under GPL2 2005 - Qt 4 - All platforms available under GPL2 Qt Today Current version is Qt 4.6 Qt 4.5 available on lab machines Current owned/developed by Nokia Available with both proprietary and open licenses GPL v2 & v3 (with special exemption) LGPL Using Qt Two different methods of interface creation Raw code: Define everything in C++ Qt Designer: Build the interface using a GUI tool Methods produce equivalent programs Using a GUI tool may be easier for sizable programs Qt Essentials What controls are available? - Widgets How are they arranged? - Layouts How are they interacted with? - Signals & Slots Widgets Individual parts that are put together to create an interface All widgets inherit from QWidget No separation of containers and controls Can
    [Show full text]
  • A Brief Introduction to Qt Bruce Bolden March 25, 2009
    Introduction to Qt 1 A Brief Introduction to Qt Bruce Bolden March 25, 2009 Introduction to Qt 2 What is Qt1? A platform independent (cross-platform) graphics library for the development of applications with/without UIs (user interfaces). Features • Intuitive C++ class library • Portability across desktop and embedded operating systems • Look and Feel of the native OS • Integrated development tools with cross-platform IDE • High runtime performance and small footprint on embed- ded systems Note: Qt is pronounced cute by Europeans. 1Qt is pronounced cute by Europeans. Introduction to Qt 3 Some frequently Used Acronyms API Application Program Interface GUI Graphical User Interface IDE Integrated Development Environment KDE K Desktop Environment LGPL GNU Lesser General Public License RTTI Run Time Type Identification SDK Software Development Toolkit KDE details: http://www.kde.org/ Introduction to Qt 4 Why Qt? • Not Java • Platform independent (cross-platform) • Large C++-based library • The choice for KDE development • Easy transition to OpenGL Introduction to Qt 5 Qt History • Trolltech was founded in 1994 • Nokia acquired Trolltech ASA, in June 2008 • Active development! { 4.5 released March 3, 2009 { 4.2 released August 24, 2006 This is Qt 4.5: http://www.youtube.com/watch?v=8xRfNsY53GY Introduction to Qt 6 Qt History|Details Nokia acquired Trolltech ASA, in June 2008, to enable the ac- celeration of their cross-platform software strategy for mobile devices and desktop applications, and to develop its Internet services business. On September 29, 2008 Nokia renamed Troll- tech to Qt Software.2 Trolltech was founded in 1994. The core team of designers at Trolltech started developing Qt in 1992, and the first commercial version of Qt was released in 1995.
    [Show full text]
  • The Qt and KDE Frameworks: an Overview
    Outline Introduction Overview Develop with Qt Develop with KDE The Qt and KDE Frameworks: An Overview Kevin Ottens Kevin Ottens | The Qt and KDE Frameworks:An Overview 1/83 Outline Introduction Overview Develop with Qt Develop with KDE Outline 1 Introduction 2 Overview 3 Develop with Qt 4 Develop with KDE Kevin Ottens | The Qt and KDE Frameworks:An Overview 2/83 Outline Introduction Overview Develop with Qt Develop with KDE Outline 1 Introduction 2 Overview 3 Develop with Qt 4 Develop with KDE Kevin Ottens | The Qt and KDE Frameworks:An Overview 3/83 Outline Introduction Overview Develop with Qt Develop with KDE Prerequisites and Goals Knowledge is a brick wall built line after line C++ Use of object oriented concepts Templates (at least a bit, but nothing hardcore) *nix To know what is a shell Recall the overall structure of a typical Unix based desktop Goals Give an overview of what can be done with Qt and KDE Give clues on how to go further Eventually give you the will to contribute , Kevin Ottens | The Qt and KDE Frameworks:An Overview 4/83 Outline Introduction Overview Develop with Qt Develop with KDE History (1/4) Since our past experiences determine what we are Trolltech 1994: Trolltech creation in Oslo, Norway 1996: First Qt selling! (ESA) 1999: Qt2, offices in Australia 2000: Qt/Embedded, offices in the US 2000: Qt/X11 available under the GPL! 2001: Sharp uses Qtopia in its products 2001: Qt3! 2002: Teambuilder is released 2003: Qt/Mac available under the GPL! 2004: Qtopia Phone Edition is released 2005: Qt4!! offices in China Kevin Ottens | The Qt and KDE Frameworks:An Overview 5/83 Outline Introduction Overview Develop with Qt Develop with KDE History (2/4) Since our past experiences determine what we are KDE: Warmup 14 October 1996: Matthias Ettrich announce on Usernet the "Kool Desktop Environment" Willing to use Qt which already had a lot of potential November 1996: kdelibs-0.0.1.tar.gz Just before Christmas: kwm, kpanel et kfm..
    [Show full text]
  • The Qt and KDE Frameworks: an Overview
    Outline Introduction Overview Develop with Qt Develop with KDE The Qt and KDE Frameworks: An Overview Kevin Ottens Kevin Ottens | The Qt and KDE Frameworks:An Overview 1/68 Outline Introduction Overview Develop with Qt Develop with KDE Outline 1 Introduction 2 Overview 3 Develop with Qt 4 Develop with KDE Kevin Ottens | The Qt and KDE Frameworks:An Overview 2/68 Outline Introduction Overview Develop with Qt Develop with KDE Outline 1 Introduction 2 Overview 3 Develop with Qt 4 Develop with KDE Kevin Ottens | The Qt and KDE Frameworks:An Overview 3/68 Outline Introduction Overview Develop with Qt Develop with KDE Prerequisites and Goals Knowledge is a brick wall built line after line C++ Use of object oriented concepts Templates (at least a bit, but nothing hardcore) *nix To know what is a shell Recall the overall structure of a typical Unix based desktop Goals Give an overview of what can be done with Qt and KDE Give clues on how to go further Eventually give you the will to contribute , Kevin Ottens | The Qt and KDE Frameworks:An Overview 4/68 Outline Introduction Overview Develop with Qt Develop with KDE History (1/4) Since our past experiences determine what we are Trolltech 1994: Trolltech creation in Oslo, Norway 1996: First Qt selling! (ESA) 1999: Qt2, offices in Australia 2000: Qt/Embedded, offices in the US 2000: Qt/X11 available under the GPL! 2001: Sharp uses Qtopia in its products 2001: Qt3! 2002: Teambuilder is released 2003: Qt/Mac available under the GPL! 2004: Qtopia Phone Edition is released 2005: Qt4!! offices in China Kevin Ottens | The Qt and KDE Frameworks:An Overview 5/68 Outline Introduction Overview Develop with Qt Develop with KDE History (2/4) Since our past experiences determine what we are KDE: Warmup 14 October 1996: Matthias Ettrich announce on Usernet the "Kool Desktop Environment" Willing to use Qt which already had a lot of potential November 1996: kdelibs-0.0.1.tar.gz Just before Christmas: kwm, kpanel et kfm..
    [Show full text]
  • Qt5 with a Dash of C++11
    + C++11 Matthew Eshleman Qt5 with a touch of C++11 covemountainsoftware.com Background - Matthew Eshleman • 15+ years of embedded software development, architecture, management, and project planning • Delivered 30+ products with many more derivative projects. Millions of people have used my code. No one has threatened me yet (except one guy in marketing.) • Primarily C / C++, lately discovered they joy of C# • Recently discovered: Qt5 with C++11 • Learn more: http://covemountainsoftware.com/consulting Qt? • Qt is an application and user interface development framework primarily focused on cross platform UI/App development. • It also happens to be a great framework for more advanced embedded platforms. Especially since Qt5. • Qt was born in 1991. • Commercial licenses. Then GPL + Commercial • 2009 added LGPL Qt Apps • Perforce Client • VLC Media Player • Bitcoin • Netflix embedded player (TVs, DVDs..) • Dropbox (Linux) A Framework has… modules… lots of them… Qt Network Qt WebSockets Qt WebKit Qt State Machine Qt Widgets Qt Json QtConcurrent QFile Qt Serial Port QThreadPool etc QVector Qt Animation QTimer QTouchEvent QSettings etc What I love… • Signal and slots • Enhanced container libraries with built in memory management • LGPL license (changing…) • Qt5 Plugin architecture (input, graphics, touch) • Cross platform • Develop UI/algorithms on PC, port to embedded target • My boys —> What I do not love • The “meta object compiler” (discuss more later) • This enables the “signals and slots” functionality… which I love. • Superset of C++. Pretty much must use their IDE if you want dynamic error highlighting and autocomplete that is “Qt aware”. Elements for today • Signals and Slots • Container classes • Embedded target workflow • Strategies to use Qt’s cross platform capabilities to enable faster development Signals and Slots • Key/critical element of the Qt framework • A signal is a message emitted by an object.
    [Show full text]