Cross-platform C++ development using Qt



Similar documents
Surface and Volumetric Data Rendering and Visualisation

[PRAKTISCHE ASPEKTE DER INFORMATIK SS 2014]

BogDan Vatra and Andy Gryc. Qt on Android: Is it right for you?

The Most Popular UI/Apps Framework For IVI on Linux

Andreas Burghart 6 October 2014 v1.0

Procase Consulting. APEX 4.1 Introduction. Oleg Mochkin

Migration and Developer Productivity Solutions Retargeting IT for Emerging Business Needs

Qt in Education. The Qt object model and the signal slot concept

AUTOMATED CONFERENCE CD-ROM BUILDER AN OPEN SOURCE APPROACH Stefan Karastanev

2015, André Melancia (Andy.PT) 1

OpenCV on Android Platforms

Latte Rapid Application Development. William Dunlap Product Manager Borland International

David Boddie. PyCon UK 2007, Birmingham

Mobile Development with Qt

SIEMENS. Teamcenter Windows Server Installation PLM

Reduces development time by 90%

USE OF PYTHON AS A SATELLITE OPERATIONS AND TESTING AUTOMATION LANGUAGE

The POCO C++ Libraries for Device Software Development

Extending Desktop Applications to the Web

Cross-Platform Software Considerations for Internet of Things

Web Development with the Eclipse Platform

Operating Systems compatible with GigasoftOBM / GigasoftACB (Supported Operation System List):

The MaXX Desktop. Workstation Environment. Revised Road Map Version 0.7. for Graphics Professionals

HP Service Manager Compatibility Matrix

Eclipse for Smalltalkers

Sisense. Product Highlights.

Reducing the Cost of Defense and Aerospace Application Development with Qt

The Advantages of PostgreSQL

Beginning Nokia Apps. Development. Qt and HTIVIL5 for Symbian and MeeGo. Ray Rischpater. Apress. Daniel Zucker

Developing Database Business Applications using VB.NET

Application Development Guide: Building and Running Applications

Mercury Users Guide Version 1.3 February 14, 2006

QML and JavaScript for Native App Development

Example of Standard API

Cross-Platform. Mac OS X ЧЯУ

Migrate AS 400 Applications to Windows, UNIX or Linux

A Monitored Student Testing Application Using Cloud Computing

How to use PDFlib products with PHP

Tools for ITIL Capacity Management: How not to spend 100,000

HTML5. Turn this page to see Quick Guide of CTTC

JavaFX Session Agenda

Qt/Embedded Whitepaper. Trolltech

Qt at NA-MIC Summer Qt Development Frameworks: Qt is used everywhere. Qt licenses support all business models. Why Qt?

Communiqué 4. Standardized Global Content Management. Designed for World s Leading Enterprises. Industry Leading Products & Platform

Lecture 1 Introduction to Android

Teamcenter Installation on UNIX and Linux Servers Guide. Publication Number PLM00011 J

System Architecture V3.2. Last Update: August 2015

FileMaker 11. ODBC and JDBC Guide

rich mobile applications made easy

CrossPlatform ASP.NET with Mono. Daniel López Ridruejo

Ruby on Rails is a web application framework written in Ruby, a dynamically typed programming language The amazing productivity claims of Rails is

A Modular Approach to Teaching Mobile APPS Development

Firewall Builder Architecture Overview

J j enterpririse. Oracle Application Express 3. Develop Native Oracle database-centric web applications quickly and easily with Oracle APEX

4D and SQL Server: Powerful Flexibility

Applets, RMI, JDBC Exam Review

Luca Caucchioli Information Technology Consultant

WEB DEVELOPMENT COURSE (PHP/ MYSQL)

VoIP support on Qtopia. Vladimir Minenko, Ph.D.

Qt Signals and Slots. Olivier Goffart. October 2013

Data Sheet VISUAL COBOL WHAT S NEW? COBOL JVM. Java Application Servers. Web Tools Platform PERFORMANCE. Web Services and JSP Tutorials

Develop Hybrid Mobile Applications with Apache Cordova & PhoneGap Enterprise

ICAWEB410A Apply web authoring tool to convert client data for websites

Database Access via Programming Languages

APPLICATIONS OF LINUX-BASED QT-CUDA PARALLEL ARCHITECTURE

PBX IVR ACD. 7011Koll Center Parkway, Suite 150 Pleasanton, CA Phone: (925) Fax: (925) SUPERVISOR, MANAGER

Short notes on webpage programming languages

IBM Rational Web Developer for WebSphere Software Version 6.0

PYTHON IN A NUTSHELL. O'REILLY Beijing Cambridge Farnham Köln Sebastopol Taipei Tokyo. Alex Martelli. Second Edition

Oracle Universal Content Management

Taboret Management Application Builder

APPENDIX A Web Redesign Infrastructure. Deployment Overview

Dynamic Web Programming BUILDING WEB APPLICATIONS USING ASP.NET, AJAX AND JAVASCRIPT

Deepak Patil (Technical Director) iasys Technologies Pvt. Ltd.

Xtreeme Search Engine Studio Help Xtreeme

FileMaker 12. ODBC and JDBC Guide

DEVELOPMENT OF AN ANALYSIS AND REPORTING TOOL FOR ORACLE FORMS SOURCE CODES

SIEMENS. Teamcenter Windows Client Installation PLM

NXTware Remote. Advanced Development and Maintenance Environment for OpenVMS and other Strategic Platforms

Reminders. Lab opens from today. Many students want to use the extra I/O pins on

Xcelsius Dashboards on SAP NetWaver BW Implementation Best Practices

CA Client Automation

Google Web Toolkit (GWT) Architectural Impact on Enterprise Web Application

SAP NetWeaver Opens SAP ERP world. Amedeo Prodi SAP Italia

HTML5 the new. standard for Interactive Web

Last Class: OS and Computer Architecture. Last Class: OS and Computer Architecture

Rocket AS v6.3. Benefits of upgrading

Main Bullet #1 Main Bullet #2 Main Bullet #3

A Comparison of Enterprise Reporting Tools

Transforming Data Integration from "Create" to "Connect"

New Features in XE8. Marco Cantù RAD Studio Product Manager

Team Size 20 Responsibility - Managing the business - Managing external projects - Billing advisor to telecommunication company

An Overview of Java. overview-1

Sviluppo soluzioni Open Source per il Cloud

ASP.NET. Web Programming. Telemark University College Department of Electrical Engineering, Information Technology and Cybernetics

Teamcenter Installation on Windows Servers Guide. Publication Number PLM00013 J

DB2 Application Development and Migration Tools

Take full advantage of IBM s IDEs for end- to- end mobile development

lubyk lua libraries for live arts Gaspard Bucher (Buma)! artist, musician, coder

FAME Operating Systems

Transcription:

Cross-platform C++ development using Qt Fall 2005 QT Presentation By Gabe Rudy

Overview About Trolltech /QT Qt Features and Benefits Examples and Code Demos and more Code! Questions

About Trolltech/QT QT Presentation By Gabe Rudy

Trolltech Founded in 1994 Offices: Oslo, Norway (HQ) Santa Clara, California Brisbane, Australia Ownership: Majority by employees 24% VC Main products: Qt and Qtopia Eirik Chambe-Eng Haavard Nord

Products Qt: a complete C++ application development framework Qtopia: a comprehensive application platform and user interface for Linux-based consumer electronics QSA: Qt Script for Applications Teambuilder: distributed compilation solution Linux /Unix

Other Products First Any Linux based PDQ will be running QTopia, which is based on QT-embedded. If you know QT, you could easily write for this platform.

Qt in a nutshell Qt is a complete C++ application development framework, including A comprehensive C++ class library RAD GUI development tool (Qt Designer) Internationalization tool (Qt Linguist) Help browser (Qt Assistant) Source code and comprehensive documentation

Qt is comprehensive Qt supplies 80-90% of commonly needed functionality for rich client developers 400+ fully documented classes Core libs: GUI, Utility, Events, File, Print, Network, Plugins, Threads, Date and Time, Image processing, Styles, Standard dialogs Modules: Canvas, Iconview, Network, OpenGL, SQL, Table, Workspace, XML Tools: Designer, Assistant, Linguist Extensions: ActiveQt, Motif migration, MFC migration Qt Solutions for platform-specific customer requests Easy to add/extend/customize

Qt is cross-platform The Qt API and tools are consistent across all supported platforms Qt runs on mobile phones to Cray supercomputers Consequence for users and customers Freedom of choice in terms of development and deployment platform Protection against changing platform fashions

A few platforms it runs on: Windows 95 through Server 2003 Mac OS X Linux and embedded Linux AIX, BSD/OS, FreeBSD, HP-UX, IRIX, NetBSD, OpenBSD, Solaris, Tru64 UNIX And more

Qt is native Qt builds on the native graphics layer Qt applications run at compiled speed

Native look on Windows

Native look on Linux

Native look on Mac OS X

Qt is open source, but

QT is also Commercial QT requires a commercial license if you plan to sell your product written in QT. Per developer licensing License cost based on edition and number of platforms Windows does not have GPL version of QT NO runtime fees/roalties etc.

Qt is rock solid Qt is used as the basis of the Linux KDE (K Desktop Environment) Millions of lines of code, strong reliability requirements, industry strength stability Widely used by Linux community thousands of developers millions of end-users Used commercially in a wide variety of demanding applications Medical devices Air traffic guidance

Qt customers Adobe, Agilent, ARM, Boeing, Bosch, Cadence, Canon, CEA Technologies, ChevronTexaco, DaimlerChrysler, Deutsche Telekom, Earth Decision Sciences, ESA, Fraunhofer, HP, IBM, Intel, i-penta JD Edwards, Lockheed Martin, LogicaCMG, Mentor Graphics, NASA, NEC, NTT, PGS, Pioneer, Rohde & Schwarz, Scania, Schlumberger, Sharp, Shell, Siemens, Sony, STN-Atlas, Stryker Leibinger, Synopsys, Thales... Qt is used for a wide variety of applications: mass-market and custom software, internal apps, research, modeling, visualization, etc..

Sample application: Abobe Photoshop Album

Qt Features and Benefits QT Presentation By Gabe Rudy

Qt Features Unique features in Qt Cross-platform, consistent, compiled API Signals and slots Class library overview Qt tools overview Documentation Third-party integration

Cross-platform, consistent API Application Qt/X11 lib Application Qt/Windows lib Application Qt/Mac lib Unix or Linux MS Windows MacOS Use the standard native tools to build Qt apps (IDE, debugger etc.) Qt provides a platform-independent encapsulation of the local window system and operating system The Qt API is identical on every platform, applications are compiled to native executables Result: Write once, compile everywhere

Signals & Slots Unique inter-object communication mechanism, provides Type-safe callback between objects Facilitates loose coupling / encapsulation Sender and receiver does not know about each other 1-to-many, many-to-1 communication between objects Fully Object-oriented

Class Library Overview Full set of GUI classes Widget set and GUI toolkit Operating system encapsulation classes OO, C++ class interface to C system calls SQL database access classes Data storing and retrieval Utility classes Commonly useful classes Integration & Migration classes Using Qt with other libraries and legacy code

OS encapsulation classes File & directory handling Date & time Registry / preferences Networking URL, socket, TCP, DNS, FTP, HTTP Process handling exec, terminate, kill, stdin/stdout/stderr I/O Threading start, terminate, semaphore, mutex, wait Dynamic library loading

SQL Database classes Application Qt library OS DB-vendor s driver library SQL Database Store, retrieve, query, traverse & modify DB data Database-independent API Oracle, Sybase/MS SQL Server, MySQL, PostgreSQL, DB/2, Interbase, ODBC DB-aware widgets Editable forms and tableviews

Utility classes String and regular expressions Unicode Text and binary I/O codecs Collections Optional alternatives to STL collections XML I/O Parser with SAX2 interface DOM level 2 implementation

Integration & Migration classes OpenGL 3D graphics rendering in a Qt widget ActiveX Host ActiveX controls in a Qt app Use Qt to create ActiveX controls Motif co-exist with legacy Motif code; stepwise migration Netscape Plugins Create Netscape/Mozilla/Opera LiveConnect plugins with Qt

Development Tools Overview Qt Designer Visual GUI builder Qt Linguist Language translators tool Qt Assistant Help browser qmake Makefile generator, eases cross-platform builds

Qt Designer MyDialog.xml MyDialogBase.cpp MyDialog.cpp WYSIWYG, drag & drop GUI builder Supports the Qt auto-layout system Designs stored in open, documented XML format Does not interfere with user s source code

Documentation Reference Manual HTML generated from the source code Fully cross-referenced Browsable from Qt Assistant or normal web browser: doc.trolltech.com Tutorials Examples Qt programming books

Examples and Code The fun stuff. QT Presentation By Gabe Rudy

Hello World(ish) #include <qapplication.h> #include <qlabel.h> int main(int argc, char* argv[]) { QApplication myapp(argc, argv); QLabel* mylabel = new QLabel("Hello MSU,0); mylabel->resize(80,30); } myapp.setmainwidget(mylabel); mylabel->show(); return myapp.exec();

Signals and Slots (in-depth)

Signals and Slots example

Defining Signals and Slots New C++ Syntax for defining Signals/Slots class myclass : public QObject { Q_OBJECT //required macro, no semicolon signals: void somethinghappened(); public slots: void slotdosomething(); private slots: void slotdosomethinginternal(); };

Gory Details Signals: emit events declare as signals, otherwise normal member functions You don't implement them. Rather, you send them with the keyword emit E.g. emit sliderchanged(5) Slots: receive and handle events Normal member functions declared as slots Connect: must connect signals to slots QObject::connect( mymenu, SIGNAL(activated(int)), myobject, SLOT(slotDoMenuFunction(int)) ); moc: meta object compiler (preprocessor) converts these new keywords to real C++

Hello World Proper int main(int argc, char* argv[]) { QApplication myapp(argc, argv); QWidget* mywidget = new QWidget(); mywidget->setgeometry(400, 300, 120, 90); QLabel *mylabel = new QLabel("Hello MSU!",myWidget); mylabel->setgeometry(10, 10, 80, 30); QPushButton* myquitbutton = new QPushButton("Quit", mywidget); myquitbutton->setgeometry(10, 50, 100, 30); QObject::connect(myQuitButton, SIGNAL(clicked()), &myapp, SLOT(quit()); } myapp.setmainwidget( mywidget ); mywidget->show(); return myapp.exec();

Hello with QT Designer Create a widget/dialog/wizard etc in Designer Use the code generated at compile time in the program. #include "helloui.h" //Generated at compile time int main(int argc, char* argv[]) { QApplication myapp(argc, argv); HelloUI* hello = new HelloUI(0); myapp.setmainwidget( hello ); hello->show(); return myapp.exec(); }

Look at Designer.ui and Demo Designer generates clean xml code Demo shows off QT well.

Thank you! Additional information resources: http://www.trolltech.com/ http://kde.org Gabe Questions?