Qt Programming.

Slides:



Advertisements
Similar presentations
Introduction to Visual Basic.NET Uploaded By: M.Sheraz anjum.
Advertisements

Lecture 4: Embedded Application Framework Qt Tutorial Cheng-Liang (Paul) Hsieh ECE 424 Embedded Systems Design.
QT GUI Programming CS340 – Software Design © 2009 – Jason Leigh University of Illinois at Chicago.
Chapter 2: Exploring the Desktop The Complete Guide to Linux System Administration.
Installing Windows XP Professional Using Attended Installation Slide 1 of 41Session 2 Ver. 1.0 CompTIA A+ Certification: A Comprehensive Approach for all.
QT Intro. 김기형
Wir schaffen Wissen – heute für morgen A.C.Mezger An EPICS Display manager with Qt The EPICS display manager MEDM is a very powerful tool with many features.
Wir schaffen Wissen – heute für morgen A.C.Mezger An EPICS Display manager with Qt.
Cross-platform approach to create the interactive application based on ROOT and Qt GUI libraries Rene Brun (CERN) Valeri Fine (BNL,
An Overview of Qt - asankar1. Agenda About Qt –A brief intro of Qt Qt development tools –Tools used for building Qt application Qt Architecture –The underlying.
OPEN OFFICE PREPARED BY: Mantilla, Leia Anjelica A. Pitogo, Adones B. Verdida, Reymond J.
Oct ROOT 2002, CERN, Geneva Qt-Based Implementation of Low Level ROOT Graphical Layer By V.Fine.
Qt Igor November 8, 2002 Friday’s HENP Group Meeting.
Lesson 6 Operating Systems and Software
Computer Concepts 7th Edition Parsons/Oja Chapter 3 Computer Software Section A: Software Basics.
Module 2 Part I Introduction To Windows Operating Systems Intro & History Introduction To Windows Operating Systems Intro & History.
@2011 Mihail L. Sichitiu1 Android Introduction Platform Overview.
Introduction to Graphical User Interfaces. Objectives * Students should understand what a procedural program is. * Students should understand what an.
Cross-platform GUI Frameworks for 3D Apps and Games: Qt vs wxWidgets
IE 411/511: Visual Programming for Industrial Applications
FLTK Tutorial.
2. Introduction to the Visual Studio.NET IDE. Chapter Outline Overview of the Visual Studio.NET IDE Overview of the Visual Studio.NET IDE Menu Bar and.
NOTE: To change the image on this slide, select the picture and delete it. Then click the Pictures icon in the placeholder to insert your own image. WEB.
Object Oriented Software Development 9. Creating Graphical User Interfaces.
Irwin/McGraw-Hill Copyright© 2000 by the McGraw-Hill Companies, Inc. PowerPoint® Presentation to accompany prepared by James T. Perry University of San.
CHAPTER TWO INTRODUCTION TO VISUAL BASIC © Prepared By: Razif Razali 1.
1 Chapter 12 GUI C/C++ Language Programming Wanxiang Che.
Dale Roberts Introduction to Visual Programming Dale Roberts, Lecturer Computer Science, IUPUI Department of Computer and.
Microsoft Visual Basic 2005 BASICS Lesson 1 A First Look at Microsoft Visual Basic.
Department of Computer Engineering Dongguk University Prof. Jin-Woo Jung Practice hour : 2008/11/14 8. Qt / Embedded.
QT Programming QT Programming Ruku Roychowdhury. Background QT is a cross platform application framework. Widely used to develop GUI applications. Originally.
9-Nov-97Tri-Ada '971 TASH An Alternative to the Windows API TRI-Ada ‘97 Terry J. Westley
. The ideas behind Qt and a live demo Qt in Education.
GUIs Basic Concepts. GUI GUI : Graphical User Interface Window/Frame : a window on the screen Controls/Widgets : GUI components.
Visual Basic.Net. Software to Install Visual Studio 2005 Professional Edition (Requires Windows XP Pro) MSDN Library for Visual Studio 2005 Available.
1. 2 Qt Toolkit ● C++ toolkit for cross-platform GUI application development – GUI functions (GUI = graphical user interface) – Data access components,
Computer System Structures
Operating System and Utility Programs
Dive Into® Visual Basic 2010 Express
Beginning of Xamarin for iOS development
Android Mobile Application Development
Eclipse.
Operating System & Application Software
Mobile Application Development with MeeGo™ - Touch Apps & UI Design
CompSci 230 S Software Construction
Computer Software: Programming
Introduction to Visual Basic 2008 Programming
Java Look-and-Feel Design Guidelines
Event Driven Programming Dick Steflik
Jonathan Riddell Canonical Kubuntu Ubuntu KDE
1. Introduction to Visual Basic
Introduction to Operating System (OS)
QT graphical user interface framework
R Programming.
Module 1: Getting Started
Unit 20 – Computer Game Platforms & Technology – Software Technology
Chapter 2: Operating-System Structures
Mobile Application Development with MeeGo™ - Programming with SDK
Social Media And Global Computing Introduction to Visual Studio
Understanding the Visual IDE
Chapter 2: System Structures
GTK + Programming.
Unit 20 – Computer Game Platforms & Technology – Software Technology
The Basic Usage and The Event Handling in Glade.
Graphics and FLTK CSCE 121 J. Michael Moore
Chapter 2: Operating-System Structures
Go4 GUI and GSI's QtROOT interface
Go4 GUI and GSI's QtROOT interface
An Introduction to the Windows Operating System
Presentation transcript:

Qt Programming

Introduction Early widget toolkits for X included Xaw (the Athena Widget Set, 1983), OLIT (OPEN LOOK Intrinsics Toolkit, 1988), XView (1988), Motif (1980s) and Tk. OLIT and XView function as the base toolkits for Sun's legacy OpenWindows desktop environment. Toolkits developed more recently include Qt (1991- , used by KDE), GTK+ (1997- , used by GNOME), wxWidgets (1992), FLTK (1998- ), FOX (1997- ) and fpGUI (2005-current).

Cont.. Qt is a cross-platform application framework that is widely used for developing application software with a graphical user interface (GUI) (in which cases Qt is classified as a widget toolkit) Also used for developing non-GUI programs such as command-line tools and consoles for servers. Used in Autodesk Maya, Adobe Photoshop Elements, OPIE, Skype, VLC media player, VirtualBox

Cont.. Developed by an open source project with individual developers as well as developers from nokia, digia Prior to the launch of the Qt Project, it was produced by Nokia's Qt Development Frameworks division, which came into being after Nokia's acquisition of the Norwegian company Trolltech, the original producer of Qt. Then Nokia announced the sale of  Qt's commercial licensing and professional services to Digia PLC.

Cont.. Qt uses standard C++ but makes extensive use of a special code generator (called the Meta Object Compiler, or moc) together with several macros to enrich the language. Qt can also be used in several other programming languages via language bindings. 

Cont.. It runs on the major desktop platforms and some of the mobile platforms. It has extensive internationalization support. Non-GUI features include SQL database access, XML parsing, thread management, network support, and a unified cross-platform API for file handling.

Platforms Windows – Qt for Microsoft Windows Windows CE / Mobile – Qt for Windows CE/Windows Mobile Symbian – Qt for the Symbian platform.  Mac OS X – Qt for Apple Mac OS X. Support for applications on top of Cocoa APIs X11 – Qt for X Window System (GNU/Linux, FreeBSD, HP-UX, Solaris, AIX, etc.) Embedded Linux – Qt for embedded platforms (PDA, Smartphone, etc.)

Editions There are three editions of Qt available on each of these platforms, namely: GUI Framework – commercial entry level GUI edition, stripped of network and database support (formerly known as "Desktop Light") Full Framework – complete commercial edition Open Source – complete Open Source edition

Current Trolltech released Qt 4.0 on June 28, 2005 and introduced five new technologies in the framework: Tulip A set of template container classes. Interview A model/view architecture for item views. Arthur A 2D painting framework. Scribe A Unicode text renderer with a public API for performing low-level text layout. MainWindow A modern action-based main window, toolbar, menu, and docking architecture.

Modules Modules for working with Qt's tools QtDesigner QtUiTools QtHelp QtTest

Metaobject compiler The metaobject compiler, termed moc, is a tool that is run on the sources of a Qt program. It interprets certain macros from the C++ code as annotations, and uses them to generate additional C++ code with "Meta Information" about the classes used in the program. This meta information is used by Qt to provide programming features not available natively in C++: the signal/slot system, introspection and asynchronous function calls

Qt Program #include <qapplication.h> #include <qpushbutton.h> int main( int argc, char **argv ) { Qapplication a( argc, argv ); QPushButton hello( "Hello world!", 0 ); hello.resize( 100, 30 ); a.setMainWidget( &hello ); hello.show(); return a.exec(); }

Explaination #include <qapplication.h> This line includes the QApplication class definition. There has to be exactly one QApplication object in every application that uses Qt. QApplication manages various application-wide resources, such as the default font and cursor.

Cont.. #include <qpushbutton.h> This line includes the QPushButton class definition. QPushButton is a classical GUI push button that the user can press and release. It manages its own look and feel, like every other QWidget. A widget is a user interface object that can process user input and draw graphics. The programmer can change both the overall look and feel and many minor properties of it (such as color), as well as the widget's content. A QPushButton can show either a text or a QPixmap.

Cont.. int main( int argc, char **argv ) { The main() function is the entry point to the program. Almost always when using Qt, main() only needs to perform some kind of initialization before passing the control to the Qt library, which then tells the program about the user's actions via events. argc is the number of command-line arguments and argv is the array of command-line arguments. This is a C/C++ feature.

Cont.. QApplication a( argc, argv ); a is this program's QApplication. Here it is created and processes some of the command-line arguments (such as -display under X Window). QPushButton hello( "Hello world!", 0 ); Here, A push button is created. hello.resize( 100, 30 ); The button is set up to be 100 pixels wide and 30 pixels high

Cont.. a.setMainWidget( &hello ); hello.show(); return a.exec(); The push button is chosen as the main widget for the application. If the user closes a main widget, the application exits. hello.show(); A widget is never visible when you create it. You must call show() to make it visible. return a.exec(); This is where main() passes control to Qt, and exec() will return when the application exits. In exec(), Qt receives and processes user and system events and passes these on to the appropriate widgets.

Compiling To compile a C++ application you need to create a makefile. The easiest way to create a makefile for Qt is to use the qmake build tool supplied with Qt. qmake -project qmake The first command tells qmake to create a .pro (project) file. The second command tells it to create a (platform-specific) makefile based on the project file. You should now be able to type make (or nmake if you're using Visual Studio) and then run your first Qt application!