C++ GUI Programming with Qt 3

Size: px
Start display at page:

Download "C++ GUI Programming with Qt 3"

Transcription

1 Welcome from Budapest Welcome from ELTE University 1 Rozália Szabó Nacsa Eötvös Loránd University, Budapest Faculty of Informatics nacsa@inf.elte.hu 2 Qt Overview Qt is a complete C++ application development framework. It includes a class library and tools for cross-platform development and internationalization. C++ GUI Programming with Qt 3 Qt applications run natively, compiled from the same source code, on all supported platforms: - Qt/Windows (Microsoft Windows XP, 2000, NT 4, Me/98/95) - Qt/X11 (Linux, Solaris, HP-UX, IRIX, AIX, and other Unix variants) - Qt/Mac (Mac OS X) - Qt/Embedded (embedded Linux) 3 4 Why Qt? expanded markets short learning curves, ease of use platform independence for developers native look and feel no runtime environment high performance (no virtual machine or emulation layers) robustness (+simple memory management) easy integration with 3rd party libraries and products (C++ libs) migration from MFC, Motif extra widgets and components available good C++ performance available source code nice documentation high-quality technical support Running Qt Assistant

2 The Qt s Welcome window Class Hierarchy Hello Qt application Hello Qt: includes QObject QWidget QFrame QLabel 1. Give the definitions of used classes QApplication

3 Hello Qt: application Hello Qt: label Qt supports command-line arguments on its own. Second parameter (0) means no parent. 1. Gives the definitions of used classes 2. Create a QApplication object. 1. Gives the definitions of used classes 2. Creates a QApplication object. 3. Create a QLabel object with no parent Hello Qt:main widget Hello Qt: show If label is said to be a main widget it vanishes from the memory AND from the screen as well when it is closed. Widgets are created hidden by default. (no flickering) 1. Gives the definitions of used classes 2. Creates a QApplication object. 3. Creates a QLabel object with no parent. 4. Set the label as the application s main widget. 1. Gives the definitions of used classes 2. Creates a QApplication object. 3. Creates a QLabel object with no parent. 4. Sets the label as the application s main widget. 5. Make the label visible Hello Qt: exec HTML - style formatting Application turns into a stand by state waiting for messages. 1. Give the definitions of used classes 2. Create a QApplication object. 3. Create a QLabel object with no parent. 4. Set the label as the application s main widget. 5. Make the label visible 6. Pass application s control on Qt. ( event loop ) 17 QLabel *label = new QLabel("<h1><i>Hello</i>" "<font color=red> Qt!</font></h2>",0); 18 3

4 Compiling & Running Directory s Contents hello.exe hello.obj hello.pro Makefile 1. qmake project 2. qmake hello.pro 3. nmake 4. hello QPushButton The Quit application QApplication Responding to User Actions #include <qpushbutton.h> int main(int argc, char *argv[]) QPushButton *button= new QPushButton("Quit",0); quit.cpp #include <qpushbutton.h> int main(int argc, char *argv[]) QPushButton *button = new QPushButton("Quit",0); QObject::connect(button,SIGNAL(clicked()),&app,SLOT(quit())); app.setmainwidget(button); button->show(); quit.cpp 21 QObject::connect(button,SIGNAL(clicked()),&app,SLOT(quit())); app.setmainwidget(button); button->show(); 1. Give the definitions of used classes 2. Create a QApplication object. 3. Create a QPushButton object with no parent. 4. Make connection to respond 5. Set the button as the application s main widget. 6. Make the button visible 7. Pass application s control on Qt. 22 Making Connections macros QObject::connect(button,SIGNAL(clicked()),&app,SLOT(quit())); button clicked() quit() application member function of the QObject class QObject::connect(button,SIGNAL(clicked()),&app,SLOT(quit()));

5 Compiling & Running Numbers application Directory s Contents quit.cpp quit.exe quit.obj quit.pro Makefile main.cpp 1. qmake project 2. qmake o Makefile quit.pro 3. nmake 4. quit Form Class repesenting the main window Form s Design Caption QVBox QHBox QSpinBox QSlider QSpinBox QHBox Classes QSlider QLineEdit QEditLine QVBox Form 27 QApplication 28 Modularization Form Class - Declaration main.cpp 29 #ifndef FORM_H #define FORM_H #include <qwidget.h> #include <qvbox.h> class QHBox; class QSpinBox; Forward declaration class QSlider; class QLineEdit; class Form: public QVBox Form inherits from QVBox public: Form(QWidget *parent=0, const char *name=0); constructor private: QVBox *vbox; QHBox *hbox; QSpinBox *spinbox; Pointers QSlider *slider; QLineEdit *lineedit; ; #endif 30 5

6 Form Class - Implementation #include <qvbox.h> #include <qhbox.h> #include <qspinbox.h> #include <qslider.h> #include <qlineedit.h> #include " Form::Form(QWidget *parent, const char *name) : QVBox(parent,name) setmargin(6); setspacing(6); hbox = new QHBox(this); lineedit = new QLineEdit(this); hbox->setmargin(6); hbox->setspacing(6); spinbox = new QSpinBox(hbox); slider = new QSlider(Qt::Horizontal,hbox); slider->setrange(0,10); spinbox->setrange(0,10); Caption QVBox QHBox QSpinBox QSlider QLineEdit Numbers application s main program #include "" int main(int argc, char *argv[]) Form *form = new Form; app.setmainwidget(form); form->show(); main.cpp Caption QVBox QHBox QSpinBox QSlider QLineEdit spinbox->setvalue(5); connect(slider,signal(valuechanged(int)),spinbox,slot(setvalue(int))); connect(spinbox,signal(valuechanged(int)),slider,slot(setvalue(int))); Creating Custom Slots - Declaration... class Form: public QVBox Q_OBJECT public: Form(QWidget *parent=0, const char *name=0); private: QHBox *hbox; QSpinBox *spinbox; QSlider *slider; QLineEdit *lineedit; Q_OBJECT macro consists of function declarations for moc. moc: meta object compiler Custom Slot Implementation 1... Form::Form(QWidget *parent, const char *name) :QVBox(parent,name) setmargin(6); setspacing(6);... connect(slider,signal(valuechanged(int)),spinbox,slot(setvalue(int))); connect(spinbox,signal(valuechanged(int)),slider,slot(setvalue(int))); connect(slider,signal(valuechanged(int)),this,slot(sayasword(int))); QString words[11]; void initwords(); public slots: void sayasword(int i); ;... Words of numbers are stored in an array. This is not a standard C++ element. It will be transferred into standard C++ code by moc. 33 initwords(); spinbox->setvalue(5); The initial value must be set AFTER establishing connections. custom slot 34 Custom Slot Implementation 2 Compiling & Running... void Form::sayAsWord(int i) lineedit->settext(words[i]); qmake project qmake numbers.pro nmake numbers.pro void Form::initWords() words[0] = "null"; words[1] = "one";... words[10] = "ten"; ########################## # Automatically generated by ########################## TEMPLATE = app INCLUDEPATH +=. # Input HEADERS += SOURCES += main.cpp

7 Memory Management & Parent-Children Relationship Form QHBox(hbox) list of children The only objects we have to delete are the objects we create with new and that have no parents. QSpinBox(spinBox) QSilder(slider) Main widget is automatically deleted after close. QLineEdit(lineEdit) We have used new but we do not have to delete them either Layout Manager Object to manage the size and position of the widget. Layout manager classes are not widgets, but they can have parent and chidren. #ifndef FORM_H #define FORM_H #include <qwidget.h> class QSpinBox; class QSlider; class QLineEdit; class Form: public QWidget public: Form(QWidget *parent=0, const char *name=0); private: QSpinBox *spinbox; QSlider *slider; QLineEdit *lineedit; ; #endif Form::Form(QWidget *parent, const char *name) : QWidget(parent,name) spinbox = new QSpinBox(this); slider = new QSlider(Qt::Horizontal,this); slider->setrange(0,10); spinbox->setrange(0,10); lineedit = new QLineEdit(this); QHBoxLayout *toplayout = new QHBoxLayout; //Layout with no parent toplayout->addwidget(spinbox); toplayout->addwidget(slider); #include <qlayout.h> #include <qspinbox.h> #include <qslider.h> #include <qlineedit.h> #include "" Caption QVBox QHBox QSpinBox QSlider Caption QSpinBox QSlider mainlayout toplayout QVBoxLayout *mainlayout = new QVBoxLayout(this); //Layout with "this" parent QLineEdit QLineEdit mainlayout->addlayout(toplayout); mainlayout->addwidget(lineedit); mainlayout->setmargin(11); mainlayout->setspacing(6); connect(slider,signal(valuechanged(int)),spinbox,slot(setvalue(int))); connect(spinbox,signal(valuechanged(int)),slider,slot(setvalue(int))); spinbox->setvalue(5); //Set value AFTER connections!!

8 Parent - children relationship Form mainlayout Caption QSpinBox QSlider QLineEdit Form QSpinBox (spinbox) QSlider (slider) QLineEdit (lineedit) QVBoxLayout(mainLayout) QSpinBox (spinbox) QSlider (slider) QLineEdit (lineedit) QVBoxLayout(mainLayout) QHBoxLayout(topLayout) First toplayout is created with no parent, but we do not have to manage its deletion, because it will be added to the mainlayout and therefore mainlayout became its parent. to delete or not to delete? toplayout Main widget and its childrens are automatically deleted after close. QHBoxLayout(topLayout) 43 QHBoxLayout *toplayout = new QHBoxLayout; //Layout with no parent toplayout->addwidget(spinbox); toplayout->addwidget(slider); QVBoxLayout *mainlayout = new QVBoxLayout(this); //Layout with "this" parent mainlayout->addlayout(toplayout); //mainlayout will be the parent for toplayout mainlayout->addwidget(lineedit); // this (Form) remains the parent for lineedit 44 The.ui file and the generated C++ code Qt designer form.ui UIC Reads and writes main.cpp Reading Generates #includes Tool Generated source file 45 Revision controlled source file 46 Qt designer The subclassing approach formbase.ui UIC formbase.h Inheritance Application specific functions can be given in form.ui.h file. The ui.h extension approach form.ui UIC Qt designer form.ui.h Reads and writes Reading Generates #includes Tool Generated source file Revision controlled source file formbase.cpp main.cpp File formbase.h és a formbase.cpp are generated after modification of the form. Application specific functions will be added in the subclass. 47 Reads and writes Reading Generates #includes Tool Generated source file Revision controlled source file main.cpp 48 8

9 The QtDesigner s screen Starting Qt Designer ProjectOverview Toolbox ObjectExplorer Properties Editor/ Signal Handlers 49 File/New/C++ Project 50 File/New/Widget Laying Out Elements

10 Conneting widgets: Edit/Connections <connections> form.ui <connection> <sender>slider</sender> <signal>valuechanged(int)</signal> <receiver>spinbox</receiver> <slot>setvalue(int)</slot> </connection> <connection> <sender>spinbox</sender> <signal>valuechanged(int)</signal> <receiver>slider</receiver> <slot>setvalue(int)</slot> </connection> </connections> Declaring variable Creating Custom Slots Edit/Slots... /New Function void Form::sayAsWord( int i) lineedit->settext(words[i]); Edit/Connections 57 Creating custom functions and the constructor 58 Adding main function File/New... /C++ Main file Edit/Slots... /New Function void Form::init() spinbox->setmaxvalue(10); slider->setmaxvalue(10); initwords(); spinbox->setvalue(5); Creating the Form init() function will be performed automatically. void Form::initWords() words[0] = "null";... words[10] = "ten";

11 The generated main.cpp program #include "" int main( int argc, char ** argv ) QApplication a( argc, argv ); Form w; w.show(); a.connect( &a, SIGNAL( lastwindowclosed() ), &a, SLOT( quit() ) ); return a.exec(); Compiling & Running 1. qmake project 2. qmake words.pro 3. make Project file of Words application Extending the functionality of the program TEMPLATE = app INCLUDEPATH +=. Task: Let us make it works vice verse. # Input HEADERS += form.ui.h INTERFACES += form.ui SOURCES += main.cpp 1. qmake project 2. qmake -o Makefile words.pro 3. nmake 4. words Typing Defining a new slot Implementing the new slot void Form::slotTextChanged_( const QString & s ) bool l=false; for (int i=0; i< (int) sizeof(words)/sizeof(words[0]) &&!l;i++) if(words[i]==s) l=true; slider->setvalue(i);

12 Connecting the widgets Compiling & Running

Welcome from Budapest

Welcome from Budapest Welcome from Budapest 1 Welcome from ELTE University Rozália Szabó Nacsa Eötvös Loránd University, Budapest Faculty of Informatics nacsa@inf.elte.hu 2 C++ GUI Programming with Qt 3 3 Qt Overview Qt Qtis

More information

C++ GUI Programming with Qt 3. Rozália Szabó Nacsa Eötvös Loránd University, Budapest

C++ GUI Programming with Qt 3. Rozália Szabó Nacsa Eötvös Loránd University, Budapest C++ GUI Programming with Qt 3 Rozália Szabó Nacsa Eötvös Loránd University, Budapest nacsa@inf.elte.hu 1 The Task QMainWindow (RichEdit) QTextEdit(textEdit) 2 The ui.h extension approach Qt designer Application

More information

Lab 12: GUI programming with Qt

Lab 12: GUI programming with Qt Lab 12: GUI programming with Comp Sci 1585 Data Structures Lab: Tools for Computer Scientists Outline 1 Outline 1 (Pronounced cute ) https://www.qt.io/what-is-qt/ https://showroom.qt.io/ https://en.wikipedia.org/wiki/_(software)

More information

Object-Oriented Programming

Object-Oriented Programming iuliana@cs.ubbcluj.ro Babes-Bolyai University 2018 1 / 33 Overview 1 2 3 4 5 6 2 / 33 I Qt is a cross-platform application and UI framework in C++. Using Qt, one can write GUI applications once and deploy

More information

QT/KDE Research Paper CS B 27 February 2002

QT/KDE Research Paper CS B 27 February 2002 QT/KDE Research Paper CS 159.3 B 27 February 2002 Submitted by: AY-AD CAJIPE CHAN CHENG MAGDARAOG KDE Facts and Figures KDE is a big project. While it is very hard to quantify what this means exactly,

More information

Qt-Based Implementation of Low Level ROOT Graphical Layer

Qt-Based Implementation of Low Level ROOT Graphical Layer Qt-Based Implementation of Low Level ROOT Graphical Layer By V.Fine ROOT Low Level Graphics Level It is well-known that ROOT package has been ported to many different platforms which include the various

More information

ECE 462 Object-Oriented Programming using C++ and Java. Graphical User Interface

ECE 462 Object-Oriented Programming using C++ and Java. Graphical User Interface ECE 462 Object-Oriented Programming using C++ and Java Graphical User Interface Yung-Hsiang Lu yunglu@purdue.edu YHL Graphical User Interface 1 GUI using C++ / Qt YHL Graphical User Interface 2 Qt + Eclipse

More information

OO for GUI Design (contd.) Questions:

OO for GUI Design (contd.) Questions: OO for GUI Design (contd.) Questions: 1 1. What is a window manager and what are its responsibilities? 2 2. How would you define an event in the context of GUI programming? 3 3. What is the first thing

More information

Qt Essentials - Objects Module

Qt Essentials - Objects Module Qt Essentials - Objects Module Training Course Visit us at http://qt.digia.com Produced by Digia Plc. Material based on Qt 5.0, created on September 27, 2012 Digia Plc. Module: Signals & Slots Event Handling

More information

Document Revision No.: 1 Revised: 03/12/09 RIT KGCOE MSD Program. P09027 Upper Extremity Motion Capture System. Software Manual

Document Revision No.: 1 Revised: 03/12/09 RIT KGCOE MSD Program. P09027 Upper Extremity Motion Capture System. Software Manual P09027 Upper Extremity Motion Capture System Software Manual By: Melissa Gilbert, Dan Chapman, Adey Gebregiorgis, Pooja Nanda, Alan Smith and J.J Guerrette Table of contents 1 GUI USER MANUAL... 2 1.1

More information

Qt Essentials - Fundamentals of Qt Module

Qt Essentials - Fundamentals of Qt Module Qt Essentials - Fundamentals of Qt Module Qt Essentials - Training Course Produced by Nokia, Qt Development Frameworks Material based on Qt 4.7, created on December 15, 2010 http://qt.nokia.com 1/28 Module:

More information

Qt Essentials - Fundamentals of Qt Module

Qt Essentials - Fundamentals of Qt Module Qt Essentials - Module Training Course Visit us at http://qt.digia.com Produced by Digia Plc. Material based on Qt 5.0, created on September 27, 2012 Digia Plc. The Story of Qt Developing a Hello World

More information

Exercises Lecture 3 Layouts and widgets

Exercises Lecture 3 Layouts and widgets Exercises Lecture 3 Layouts and widgets Aim: Duration: This exercise will help you explore and understand Qt's widgets and the layout approach to designing user interfaces. 2h The enclosed Qt Materials

More information

Qt Essentials - Widgets Module

Qt Essentials - Widgets Module Qt Essentials - Module Training Course Visit us at http://qt.digia.com Produced by Digia Plc. Material based on Qt 5.0, created on September 27, 2012 Digia Plc. Module: Common Layout Management Guidelines

More information

2. The quiz screen showing the question, text field (QLineEdit in QT) for the answer and the Next Question button

2. The quiz screen showing the question, text field (QLineEdit in QT) for the answer and the Next Question button SFDV4001 OOP with C++ and UI Part 2 of the Quiz System project implementing the user interface In this part of the project use will use QT to build the GUI for the project you have done in part 1. Instead

More information

SERIOUS ABOUT SOFTWARE. Qt Core features. Timo Strömmer, May 26,

SERIOUS ABOUT SOFTWARE. Qt Core features. Timo Strömmer, May 26, SERIOUS ABOUT SOFTWARE Qt Core features Timo Strömmer, May 26, 2010 1 Contents C++ refresher Core features Object model Signals & slots Event loop Shared data Strings Containers Private implementation

More information

Praktische Aspekte der Informatik

Praktische Aspekte der Informatik Praktische Aspekte der Informatik Moritz Mühlhausen Prof. Marcus Magnor https://graphics.tu-bs.de/teaching/ws1718/padi/ 1 Your Proposal It s due 17.11.2017! https://graphics.tu-bs.de/teaching/ws1718/padi/

More information

INSTRUCTIONS: GOOD LUCK! [TURN OVER]

INSTRUCTIONS: GOOD LUCK! [TURN OVER] INSTRUCTIONS: 1. This examination paper consists of 6 pages. 2. This is a closed book examination. 3. The mark for each question is given in brackets next to the question. 4. Answer all five questions

More information

Graphical User Interfaces

Graphical User Interfaces Chapter 14 Graphical User Interfaces So far, we have developed programs that interact with the user through the command line, where the user has to call a Python program by typing its name and adding the

More information

Tuesday, 9 March Introduction to Qt

Tuesday, 9 March Introduction to Qt Introduction to Qt Qt Qt supports the development of multi-platform GUI applications It has a write once, compile anywhere approach Using a single source tree and a simple recompilation applications can

More information

Contents ROOT/Qt Integration Interfaces

Contents ROOT/Qt Integration Interfaces Contents 1 ROOT/Qt Integration Interfaces 3 1.1 Qt-ROOT Implementation of TVirtualX Interface (BNL)......................... 3 1.1.1 Installation............................................... 3 1.1.2

More information

CopperSpice: A Pure C++ GUI Library. Barbara Geller & Ansel Sermersheim CPPCon - September 2015

CopperSpice: A Pure C++ GUI Library. Barbara Geller & Ansel Sermersheim CPPCon - September 2015 CopperSpice: A Pure C++ GUI Library Barbara Geller & Ansel Sermersheim CPPCon - September 2015 1 Introduction What is CopperSpice Why we developed CopperSpice Drawbacks of Qt Advantages of CopperSpice

More information

Designing Interactive Systems II

Designing Interactive Systems II Designing Interactive Systems II Computer Science Graduate Programme SS 2010 Prof. Dr. RWTH Aachen University http://hci.rwth-aachen.de 1 Review 2 Review Web 2.0 in keywords 2 Review Web 2.0 in keywords

More information

Review. Designing Interactive Systems II. Introduction. Web 2.0 in keywords GWT Cappuccino HTML5. Cross platform GUI Toolkit

Review. Designing Interactive Systems II. Introduction. Web 2.0 in keywords GWT Cappuccino HTML5. Cross platform GUI Toolkit Review Designing Interactive Systems II Computer Science Graduate Programme SS 2010 Prof. Dr. RWTH Aachen University Web 2.0 in keywords GWT Cappuccino HTML5 http://hci.rwth-aachen.de 1 2 Introduction

More information

The following article is about how to develop a high quality plugin.

The following article is about how to develop a high quality plugin. Brief Introduction In Deepin Desktop Environment, the Dock not only has highly customziable appearance, but also provided API document. Every community developer can extend it by your own interest to enrich

More information

INTRODUCING Qt The Cross-Platform C++ Development Framework. Presented by Cody Bittle

INTRODUCING Qt The Cross-Platform C++ Development Framework. Presented by Cody Bittle INTRODUCING Qt The Cross-Platform C++ Development Framework Presented by Cody Bittle OVERVIEW 1. About Trolltech 2. Introducing Qt 3. Why Qt? Section One ABOUT TROLLTECH About Trolltech COMPANY INFORMATION

More information

Using the GeoX Framework

Using the GeoX Framework Using the GeoX Framework Michael Wand February 3rd, 2014 1. Introduction GeoX is a collection of C++ libraries for experimenting with geometric modeling techniques (GeoX = geometry experiments). It consists

More information

Friday, 4 January 13. Introduction to Qt

Friday, 4 January 13. Introduction to Qt Introduction to Qt What is Qt? Qt is a cross platform development framework written in C++. C++ framework bindings for other languages Python, Ruby, C#, etcetera Original for user interfaces now for everything

More information

Hello, World! in C. Johann Myrkraverk Oskarsson October 23, The Quintessential Example Program 1. I Printing Text 2. II The Main Function 3

Hello, World! in C. Johann Myrkraverk Oskarsson October 23, The Quintessential Example Program 1. I Printing Text 2. II The Main Function 3 Hello, World! in C Johann Myrkraverk Oskarsson October 23, 2018 Contents 1 The Quintessential Example Program 1 I Printing Text 2 II The Main Function 3 III The Header Files 4 IV Compiling and Running

More information

NHERI SIMCENTER PROGRAMMING BOOTCAMP JULY 30 THROUGH AUGUST 3, 2018, AT UC BERKELEY S RICHMOND FIELD STATION. GUI Development

NHERI SIMCENTER PROGRAMMING BOOTCAMP JULY 30 THROUGH AUGUST 3, 2018, AT UC BERKELEY S RICHMOND FIELD STATION. GUI Development NHERI SIMCENTER PROGRAMMING BOOTCAMP JULY 30 THROUGH AUGUST 3, 2018, AT UC BERKELEY S RICHMOND FIELD STATION GUI Development OUTLINE GUI Design Fundamentals The Qt Framework Common Data Types/Classes Building

More information

QTango QTWatcher and QTWriter classes

QTango QTWatcher and QTWriter classes Elettra Sincrotrone Trieste QTWatcher and QTWriter classes mailto: giacomo.strangolino@elettra.trieste.it QTWatcher Reads tango variables using Qtango; QObject or base types can be attached(); on new data,

More information

Exercises Lecture 2 The Qt Object Model and Signal Slot Mechanism

Exercises Lecture 2 The Qt Object Model and Signal Slot Mechanism Exercises Lecture 2 The Qt Object Model and Signal Slot Mechanism Qt in Education Aim: Duration: This exercise will help you explore the Qt object model (inheritance, properties, memory management) and

More information

Python GUIs. $ conda install pyqt

Python GUIs. $ conda install pyqt PyQT GUIs 1 / 18 Python GUIs Python wasn t originally desined for GUI programming In the interest of "including batteries" the tkinter was included in the Python standard library tkinter is a Python wrapper

More information

Integrating QML with C++

Integrating QML with C++ Integrating QML with C++ Qt Essentials - Training Course Produced by Nokia, Qt Development Frameworks Material based on Qt 4.7, created on January 18, 2011 http://qt.nokia.com 1/60 Module: Integrating

More information

Mar :51 gltexobj.cpp

Mar :51 gltexobj.cpp Page 1/4 / $Id: qt/gltexobj.cpp 3.1.2 edited Nov 8 2002 $ Copyright (C) 1992-2002 Trolltech AS. All rights reserved. This file is part of an example program for Qt. This example program may be used, distributed

More information

CS 326 Operating Systems C Programming. Greg Benson Department of Computer Science University of San Francisco

CS 326 Operating Systems C Programming. Greg Benson Department of Computer Science University of San Francisco CS 326 Operating Systems C Programming Greg Benson Department of Computer Science University of San Francisco Why C? Fast (good optimizing compilers) Not too high-level (Java, Python, Lisp) Not too low-level

More information

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

Qt in Education. The Qt object model and the signal slot concept Qt in Education The Qt object model and the signal slot concept. 2012 Digia Plc. The enclosed Qt Materials are provided under the Creative Commons Attribution-Share Alike 2.5 License Agreement. The full

More information

Qt-Interface For Volume Visualization

Qt-Interface For Volume Visualization Qt-Interface For Volume Visualization Practical Course Computer Graphics For Advanced Supervising Dr. Susanne Krömker Stefan Becker & Ronald Lautenschläger Outline 1. Terms you should know 2. Comparison

More information

Qt Introduction. Topics. C++ Build Process. Ch & Ch 3. 1) What's Qt? 2) How can we make a Qt console program? 3) How can we use dialogs?

Qt Introduction. Topics. C++ Build Process. Ch & Ch 3. 1) What's Qt? 2) How can we make a Qt console program? 3) How can we use dialogs? Topics Qt Introduction Ch 1.5 1.11 & Ch 3 1) What's Qt? 2) How can we make a Qt console program? 3) How can we use dialogs? Q: How do you pronounce Qt? A: This puppy is... 23/01/12 CMPT 212 Slides #5 Dr.

More information

Leow Wee Kheng CS3249 User Interface Development. Windowing Systems CS3249

Leow Wee Kheng CS3249 User Interface Development. Windowing Systems CS3249 Leow Wee Kheng User Interface Development 1 1 Modern computers come with graphical user interfaces... 2 2 Windows XP 3 3 Ubuntu 4 4 What is needed for GUI to work? What is needed for drop-down menu to

More information

C++ Important Questions with Answers

C++ Important Questions with Answers 1. Name the operators that cannot be overloaded. sizeof,.,.*,.->, ::,? 2. What is inheritance? Inheritance is property such that a parent (or super) class passes the characteristics of itself to children

More information

GUI in C++ PV264 Advanced Programming in C++ Nikola Beneš Jan Mrázek Vladimír Štill. Faculty of Informatics, Masaryk University.

GUI in C++ PV264 Advanced Programming in C++ Nikola Beneš Jan Mrázek Vladimír Štill. Faculty of Informatics, Masaryk University. GUI in C++ PV264 Advanced Programming in C++ Nikola Beneš Jan Mrázek Vladimír Štill Faculty of Informatics, Masaryk University Spring 2017 PV264: GUI in C++ Spring 2017 1 / 23 Organisation Lectures this

More information

Selected PyQt Widgets

Selected PyQt Widgets B Selected PyQt Widgets The screenshots shown here were taken on Linux using KDE to provide an eye-pleasing consistency. In the body of the book, screenshots are shown for Windows, Linux, and Mac OS X,

More information

Oh my. Maya is Qt! Kristine Middlemiss, Autodesk Developer Consultant, Autodesk Developer Network

Oh my. Maya is Qt! Kristine Middlemiss, Autodesk Developer Consultant, Autodesk Developer Network Oh my. Maya is Qt! Kristine Middlemiss, Autodesk Developer Consultant, Autodesk Developer Network 1 2 Biography Topics» Introducing Qt» How Qt fits into Maya» Ways to work with Qt»Qt Designer with Maya

More information

QTangoCore. Elettra Sincrotrone Trieste. Giacomo Strangolino. A multi threaded framework to develop Tango applications

QTangoCore. Elettra Sincrotrone Trieste. Giacomo Strangolino. A multi threaded framework to develop Tango applications Giacomo Strangolino Elettra Sincrotrone Trieste QTangoCore A multi threaded framework to develop Tango applications mailto: giacomo.strangolino@elettra.trieste.it Part I QtangoCore architecture overview

More information

Threads. What is a thread? Motivation. Single and Multithreaded Processes. Benefits

Threads. What is a thread? Motivation. Single and Multithreaded Processes. Benefits CS307 What is a thread? Threads A thread is a basic unit of CPU utilization contains a thread ID, a program counter, a register set, and a stack shares with other threads belonging to the same process

More information

QObject. An important class to become familiar with is the one from which all Qt Widgets are derived: QObject.

QObject. An important class to become familiar with is the one from which all Qt Widgets are derived: QObject. ezus_138004_ch09.qxd 8/4/06 9:43 AM Page 191 9C H A P T E R 9 QObject An important class to become familiar with is the one from which all Qt Widgets are derived: QObject. 9.1 QObject s Child Managment..........

More information

Image Processing with Qt BY KLAUDIO VITO

Image Processing with Qt BY KLAUDIO VITO Image Processing with Qt BY KLAUDIO VITO CSC Senior Design I Prof. George Wolberg May 22, 2016 Table of contents 1. Introduction pg. 2 2. Qt pg. 3 2.1. What is Qt? pg. 3 2.2 Qt Widgets Used pg. 6 3. Image

More information

Qt for Device Creation

Qt for Device Creation Qt for Device Creation Speeding up ROI & Time-to-Market with Qt Andy Nichols Software Engineer, Qt R&D, Oslo Overview Problems facing Device Creators How Qt for Device Creation addresses those Problems

More information

CE221 Programming in C++ Part 1 Introduction

CE221 Programming in C++ Part 1 Introduction CE221 Programming in C++ Part 1 Introduction 06/10/2017 CE221 Part 1 1 Module Schedule There are two lectures (Monday 13.00-13.50 and Tuesday 11.00-11.50) each week in the autumn term, and a 2-hour lab

More information

G52CPP C++ Programming Lecture 9

G52CPP C++ Programming Lecture 9 G52CPP C++ Programming Lecture 9 Dr Jason Atkin http://www.cs.nott.ac.uk/~jaa/cpp/ g52cpp.html 1 Last lecture const Constants, including pointers The C pre-processor And macros Compiling and linking And

More information

Qt Essentials - Basic Types Module

Qt Essentials - Basic Types Module Qt Essentials - Basic Types Module Training Course Visit us at http://qt.digia.com Produced by Digia Plc. Material based on Qt 5.0, created on September 27, 2012 Digia Plc. Qt's Object Model QObject QWidget

More information

Lab 2: ADT Design & Implementation

Lab 2: ADT Design & Implementation Lab 2: ADT Design & Implementation By Dr. Yingwu Zhu, Seattle University 1. Goals In this lab, you are required to use a dynamic array to design and implement an ADT SortedList that maintains a sorted

More information

Chapter 6 Introduction to Defining Classes

Chapter 6 Introduction to Defining Classes Introduction to Defining Classes Fundamentals of Java: AP Computer Science Essentials, 4th Edition 1 Objectives Design and implement a simple class from user requirements. Organize a program in terms of

More information

Why C++? C vs. C Design goals of C++ C vs. C++ - 2

Why C++? C vs. C Design goals of C++ C vs. C++ - 2 Why C++? C vs. C++ - 1 Popular and relevant (used in nearly every application domain): end-user applications (Word, Excel, PowerPoint, Photoshop, Acrobat, Quicken, games) operating systems (Windows 9x,

More information

Qt Quick From bottom to top

Qt Quick From bottom to top SERIOUS ABOUT SOFTWARE Qt Quick From bottom to top Timo Strömmer, Feb 11, 2011 1 Contents Day 2 Qt core features Shared data objects Object model, signals and slots, properties Hybrid programming QML fluid

More information

Multithreaded Programming

Multithreaded Programming Multithreaded Programming The slides do not contain all the information and cannot be treated as a study material for Operating System. Please refer the text book for exams. September 4, 2014 Topics Overview

More information

20 Using OM Access. Chapter

20 Using OM Access. Chapter Chapter 20 Using OM Access This chapter describes the OM Access feature. OM Access is a module that provides the end user with access to the information in a diagram created by the OM Editor through a

More information

EasyFlow - v Application Developer Guide

EasyFlow - v Application Developer Guide EasyFlow - v.0.2.1 Application Developer Guide June 23, 2014 i 2013 CAMELOT Biomedical Systems Srl. The information in this document is proprietary to CAMELOT. No part of this publication may be reproduced,

More information

Qt + Maemo development

Qt + Maemo development 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

More information

Containers & Iterators

Containers & Iterators Runtime Error? Topics Containers & Iterators 1) What is the best way to store a group of items? 2) How can we step through all the items? 3) What Qt classes store items? Ch 4 03/02/12 CMPT 212 Slides #8

More information

QROSE Manual. Jose Gabriel de Figueiredo Coutinho

QROSE Manual. Jose Gabriel de Figueiredo Coutinho QROSE Manual Jose Gabriel de Figueiredo Coutinho (jgfc@doc.ic.ac.uk) P a g e 2 SECTION 1 INTRODUCTION QROSE is a C++ library for building graphical user-interfaces for ROSE tools. It s main goal is to

More information

FINAL TERM EXAMINATION SPRING 2010 CS304- OBJECT ORIENTED PROGRAMMING

FINAL TERM EXAMINATION SPRING 2010 CS304- OBJECT ORIENTED PROGRAMMING FINAL TERM EXAMINATION SPRING 2010 CS304- OBJECT ORIENTED PROGRAMMING Question No: 1 ( Marks: 1 ) - Please choose one Classes like TwoDimensionalShape and ThreeDimensionalShape would normally be concrete,

More information

EFL 을이용한타이젠네이티브웨어러블앱만들기 EFL 한국커뮤니티 박진솔

EFL 을이용한타이젠네이티브웨어러블앱만들기 EFL 한국커뮤니티 박진솔 EFL 을이용한타이젠네이티브웨어러블앱만들기 EFL 한국커뮤니티 박진솔 소개 박진솔 EFL 한국커뮤니티운영진 삼성전자 Tizen Platform UIFW, TV Profile Heavensbus@gmail.com 목차 EFL? EFL 한국커뮤니티 TIZEN? SDK 설치 프로젝트만들어보기 샘플코드 개발이막힐때 EFL? No!!!!! Executable and

More information

Lab 1: First Steps in C++ - Eclipse

Lab 1: First Steps in C++ - Eclipse Lab 1: First Steps in C++ - Eclipse Step Zero: Select workspace 1. Upon launching eclipse, we are ask to chose a workspace: 2. We select a new workspace directory (e.g., C:\Courses ): 3. We accept the

More information

Asynchronous Database Access with Qt 4.x

Asynchronous Database Access with Qt 4.x Asynchronous Database Access with Qt 4.x Dave Berton Abstract How to code around the default synchronous database access in Qt 4. The database support in Qt 4.x is quite robust. The library includes drivers

More information

Python GUI programming with PySide. Speaker: BigLittle Date: 2013/03/04

Python GUI programming with PySide. Speaker: BigLittle Date: 2013/03/04 Python GUI programming with PySide Speaker: BigLittle Date: 2013/03/04 CLI vs. GUI CLI (Command Line Interface) Take less resources. User have much more control of their system. Only need to execute few

More information

Kick Start your Embedded Development with Qt

Kick Start your Embedded Development with Qt Kick Start your Embedded Development with Qt Increasing Return On Investment & shortening time-to-market Nils Christian Roscher-Nielsen Product Manager, The Qt Company Overview Problems facing Device Creators

More information

ECE 3574: Dynamic Polymorphism using Inheritance

ECE 3574: Dynamic Polymorphism using Inheritance 1 ECE 3574: Dynamic Polymorphism using Inheritance Changwoo Min 2 Administrivia Survey on class will be out tonight or tomorrow night Please, let me share your idea to improve the class! 3 Meeting 10:

More information

CS240: Programming in C

CS240: Programming in C CS240: Programming in C Lecture 2: Hello World! Cristina Nita-Rotaru Lecture 2/ Fall 2013 1 Introducing C High-level programming language Developed between 1969 and 1973 by Dennis Ritchie at the Bell Labs

More information

82V391x / 8V893xx WAN PLL Device Families Device Driver User s Guide

82V391x / 8V893xx WAN PLL Device Families Device Driver User s Guide 82V391x / 8V893xx WAN PLL Device Families Device Driver Version 1.2 April 29, 2014 Table of Contents 1. Introduction... 1 2. Software Architecture... 2 2.1. Overview... 2 2.2. Hardware Abstraction Layer

More information

Today we spend some time in OO Programming (Object Oriented). Hope you did already work with the first Starter and the box at:

Today we spend some time in OO Programming (Object Oriented). Hope you did already work with the first Starter and the box at: maxbox Starter 2 Start with OO Programming 1.1 First Step Today we spend some time in OO Programming (Object Oriented). Hope you did already work with the first Starter and the box at: http://www.softwareschule.ch/download/maxbox_starter.pdf

More information

Object-Oriented Programming, Iouliia Skliarova

Object-Oriented Programming, Iouliia Skliarova Object-Oriented Programming, Iouliia Skliarova CBook a = CBook("C++", 2014); CBook b = CBook("Physics", 1960); a.display(); b.display(); void CBook::Display() cout

More information

Common Misunderstandings from Exam 1 Material

Common Misunderstandings from Exam 1 Material Common Misunderstandings from Exam 1 Material Kyle Dewey Stack and Heap Allocation with Pointers char c = c ; char* p1 = malloc(sizeof(char)); char** p2 = &p1; Where is c allocated? Where is p1 itself

More information

CopperSpice and the Next Generation of Signals. Barbara Geller & Ansel Sermersheim CppNow - May 2016

CopperSpice and the Next Generation of Signals. Barbara Geller & Ansel Sermersheim CppNow - May 2016 CopperSpice and the Next Generation of Signals Barbara Geller & Ansel Sermersheim CppNow - May 2016 1 Introduction Brief Introduction to CopperSpice Signals & Slots what are they boost signals CsSignal

More information

CSCE 110 PROGRAMMING FUNDAMENTALS

CSCE 110 PROGRAMMING FUNDAMENTALS CSCE 110 PROGRAMMING FUNDAMENTALS WITH C++ Prof. Amr Goneid AUC Part 15. Dictionaries (1): A Key Table Class Prof. amr Goneid, AUC 1 Dictionaries(1): A Key Table Class Prof. Amr Goneid, AUC 2 A Key Table

More information

Luis Ibáñez William Schroeder Insight Software Consortium. ITK and Graphical User Interface

Luis Ibáñez William Schroeder Insight Software Consortium. ITK and Graphical User Interface Luis Ibáñez William Schroeder Insight Software Consortium ITK and Graphical User Interface Insight ITK is not Visualization ITK is not Graphic Interface ITK is image Segmentation and Registration ITK +

More information

CSCE 313 Introduction to Computer Systems. Instructor: Dezhen Song

CSCE 313 Introduction to Computer Systems. Instructor: Dezhen Song CSCE 313 Introduction to Computer Systems Instructor: Dezhen Song Programs, Processes, and Threads Programs and Processes Threads Programs, Processes, and Threads Programs and Processes Threads Processes

More information

P2: Collaborations. CSE 335, Spring 2009

P2: Collaborations. CSE 335, Spring 2009 P2: Collaborations CSE 335, Spring 2009 Milestone #1 due by Thursday, March 19 at 11:59 p.m. Completed project due by Thursday, April 2 at 11:59 p.m. Objectives Develop an application with a graphical

More information

CSCE 313: Intro to Computer Systems

CSCE 313: Intro to Computer Systems CSCE 313 Introduction to Computer Systems Instructor: Dr. Guofei Gu http://courses.cse.tamu.edu/guofei/csce313/ Programs, Processes, and Threads Programs and Processes Threads 1 Programs, Processes, and

More information

permission by Klarälvdalens Datakonsult AB.

permission by Klarälvdalens Datakonsult AB. The contents of this manual and the associated KD Chart software are the property of Klarälvdalens Datakonsult AB and are copyrighted. Any reproduction in whole or in part is strictly prohibited without

More information

Overview. C++ Tutorial. Arrays. Pointers. Strings. Parameter Passing. Rob Jagnow

Overview. C++ Tutorial. Arrays. Pointers. Strings. Parameter Passing. Rob Jagnow Overview C++ Tutorial Rob Jagnow Pointers Arrays and strings Parameter passing Class basics Constructors & destructors Class Hierarchy Virtual Functions Coding tips Advanced topics Pointers Arrays int

More information

About 1. Chapter 1: Getting started with pyqt5 2. Remarks 2. Examples 2. Installation or Setup 2. Hello World Example 6. Adding an application icon 8

About 1. Chapter 1: Getting started with pyqt5 2. Remarks 2. Examples 2. Installation or Setup 2. Hello World Example 6. Adding an application icon 8 pyqt5 #pyqt5 Table of Contents About 1 Chapter 1: Getting started with pyqt5 2 Remarks 2 Examples 2 Installation or Setup 2 Hello World Example 6 Adding an application icon 8 Showing a tooltip 10 Package

More information

Programs. Function main. C Refresher. CSCI 4061 Introduction to Operating Systems

Programs. Function main. C Refresher. CSCI 4061 Introduction to Operating Systems Programs CSCI 4061 Introduction to Operating Systems C Program Structure Libraries and header files Compiling and building programs Executing and debugging Instructor: Abhishek Chandra Assume familiarity

More information

CSCI-243 Exam 1 Review February 22, 2015 Presented by the RIT Computer Science Community

CSCI-243 Exam 1 Review February 22, 2015 Presented by the RIT Computer Science Community CSCI-243 Exam 1 Review February 22, 2015 Presented by the RIT Computer Science Community http://csc.cs.rit.edu History and Evolution of Programming Languages 1. Explain the relationship between machine

More information

A506 / C201 Computer Programming II Placement Exam Sample Questions. For each of the following, choose the most appropriate answer (2pts each).

A506 / C201 Computer Programming II Placement Exam Sample Questions. For each of the following, choose the most appropriate answer (2pts each). A506 / C201 Computer Programming II Placement Exam Sample Questions For each of the following, choose the most appropriate answer (2pts each). 1. Which of the following functions is causing a temporary

More information

CMPT 300. Operating Systems. Brief Intro to UNIX and C

CMPT 300. Operating Systems. Brief Intro to UNIX and C CMPT 300 Operating Systems Brief Intro to UNIX and C Outline Welcome Review Questions UNIX basics and Vi editor Using SSH to remote access Lab2(4214) Compiling a C Program Makefile Basic C/C++ programming

More information

Prof. Tiago G. S. Carneiro DECOM - UFOP. Threads em Qt. Prof. Tiago Garcia de Senna Carneiro

Prof. Tiago G. S. Carneiro DECOM - UFOP. Threads em Qt. Prof. Tiago Garcia de Senna Carneiro Threads em Qt Prof. Tiago Garcia de Senna Carneiro 2007 Thread - Fundamentos Uma thread é um processo leve, portanto possui um fluxo de execução independente e troca de contexto mais rápida que um processo.

More information

Advanced Systems Programming

Advanced Systems Programming Advanced Systems Programming Introduction to C++ Martin Küttler September 19, 2017 1 / 18 About this presentation This presentation is not about learning programming or every C++ feature. It is a short

More information

Developement of a framework for building tools for managing observations with a generic telescope. Alessandro Corongiu

Developement of a framework for building tools for managing observations with a generic telescope. Alessandro Corongiu Developement of a framework for building tools for managing observations with a generic telescope. Alessandro Corongiu Report N. 37, released: 30/07/2014 Reviewer: N. D'Amico, M. Murgia Contents 1 Introduction

More information

The KDE Library Reference Guide The Reference Guide to C++ Application Design for the K Desktop Environment (KDE) Ralf Nolden

The KDE Library Reference Guide The Reference Guide to C++ Application Design for the K Desktop Environment (KDE) Ralf Nolden The KDE Library Reference Guide The Reference Guide to C++ Application Design for the K Desktop Environment (KDE) Ralf Nolden The KDevelop Team Version 0.2, Mon July 7,

More information

+ C++11. Qt5 with a touch of C++11. Matthew Eshleman covemountainsoftware.com

+ C++11. Qt5 with a touch of C++11. Matthew Eshleman covemountainsoftware.com + C++11 Qt5 with a touch of C++11 Matthew Eshleman covemountainsoftware.com Background - Matthew Eshleman 15+ years of embedded software development, architecture, management, and project planning Delivered

More information

MFC One Step At A Time By: Brandon Fogerty

MFC One Step At A Time By: Brandon Fogerty MFC One Step At A Time 1 By: Brandon Fogerty Development Environment 2 Operating System: Windows XP/NT Development Studio: Microsoft.Net Visual C++ 2005 Step 1: 3 Fire up Visual Studio. Then go to File->New->Project

More information

Course "Data Processing" Name: Master-1: Nuclear Energy Session /2018 Examen - Part A Page 1

Course Data Processing Name: Master-1: Nuclear Energy Session /2018 Examen - Part A Page 1 Examen - Part A Page 1 1. mydir directory contains three files: filea.txt fileb.txt filec.txt. How many files will be in the directory after performing the following operations: $ ls filea.txt fileb.txt

More information

the gamedesigninitiative at cornell university Lecture 7 C++ Overview

the gamedesigninitiative at cornell university Lecture 7 C++ Overview Lecture 7 Lecture 7 So You Think You Know C++ Most of you are experienced Java programmers Both in 2110 and several upper-level courses If you saw C++, was likely in a systems course Java was based on

More information

OpenPilot Gauge Version Technical Documentation. Gauge Widget Plugin API Details

OpenPilot Gauge Version Technical Documentation. Gauge Widget Plugin API Details OpenPilot Gauge Version 0.2.0 Technical Documentation Gauge Widget Plugin API Details Revision 0 Page 1 of 11 Table of Contents Revision History......3 Introduction......3 Installation under Linux......4

More information

General Computer Science II Course: B International University Bremen Date: Dr. Jürgen Schönwälder Deadline:

General Computer Science II Course: B International University Bremen Date: Dr. Jürgen Schönwälder Deadline: General Computer Science II Course: 320102-B International University Bremen Date: 2004-04-28 Dr. Jürgen Schönwälder Deadline: 2004-05-14 Problem Sheet #7 This problem sheet focusses on C++ casting operators

More information

My First Command-Line Program

My First Command-Line Program 1. Tutorial Overview My First Command-Line Program In this tutorial, you re going to create a very simple command-line application that runs in a window. Unlike a graphical user interface application where

More information

BIL 104E Introduction to Scientific and Engineering Computing. Lecture 14

BIL 104E Introduction to Scientific and Engineering Computing. Lecture 14 BIL 104E Introduction to Scientific and Engineering Computing Lecture 14 Because each C program starts at its main() function, information is usually passed to the main() function via command-line arguments.

More information

A tale of ELFs and DWARFs

A tale of ELFs and DWARFs A tale of ELFs and DWARFs A glimpse into the world of linkers, loaders and binary formats Volker Krause vkrause@kde.org @VolkerKrause Our Workflow Write code Run compiler... Run application Profit! Why

More information