Lab 12: GUI programming with Qt

Size: px
Start display at page:

Download "Lab 12: GUI programming with Qt"

Transcription

1 Lab 12: GUI programming with Comp Sci 1585 Data Structures Lab: Tools for Computer Scientists

2 Outline 1

3 Outline 1

4 (Pronounced cute ) is used for developing multi-platform s and graphical user interfaces (GUIs) So far, we ve only created command-line s GUIs can be nice at times, though : cross-platform framework (works on Windows, Mac OS X, Linux, etc) Little to no underlying changes needed to port from one system to another Native OS capabilities and speed

5 Making GUIs with 4 Besides making clickable programs, learning to program GUIs will give you several other skills with C++ Event-based programming Working with a (very) large library Managing memory in more complicated programs

6 Getting Started #include <Gui> int main(int argc, char *argv[]) { QApplication app(argc, argv); QLabel hello("hello World!"); hello.resize(250, 150); hello.setwindowtitle(" example"); hello.show(); } return app.exec();

7 Outline 1

8 Building Applications has its own preprocessor, the Meta Object Compiler (aka moc ) qmake-qt4 manages projects and generates makefiles automatically $ qmake-qt4 -project will make a project file (ends in.pro) that configures the makefile $ qmake-qt4 makes a makefile So, to build a project: $ qmake-qt4 -project; qmake-qt4; make

9 Overview There is one, and only one, QApplication qapp is a global pointer to the QApplication Everything clickable is called a widget Widgets can hold other widgets A widget with no parent becomes a window

10 Outline 1

11 A Notepad #include<qapplication> #include<qtextedit> int main(int argc, char** argv) { QApplication app(argc,argv); QTextEdit te; te.setwindowtitle("not Vim"); te.show(); return app.exec(); }

12 Outline 1

13 Composite Objects Widgets can be added to another widget with the addwidget() function You can use a Layout to specify how the widgets are organized Memory Management: addwidget() takes a pointer and is responsible for cleaning up all its children

14 Layout Example #include<gui> int main(int argc, char** argv) { QApplication app(argc,argv); QTextEdit* te = new QTextEdit; QPushButton* quit = new QPushButton("&Quit"); QVBoxLayout* layout = new QVBoxLayout; layout->addwidget(quit); layout->addwidget(te); QWidget window; window.setlayout(layout); window.show(); return app.exec(); }

15 Outline 1

16 Making Buttons Do Things is event-driven: QApplication monitors what the user does and sends events to widgets when something happens Signal: An event caused by a widget: button click, key press, etc. Slot: An action taken when a signal is sent Signals are connected to slots by using the connect(...) function e.g. connect(source-object, SIGNAL(signal name()), destination-object, SLOT(slot name())) connects signals to slots

17 Actually Quitting #include<gui> int main(int argc, char** argv) { QApplication app(argc,argv); QTextEdit* te = new QTextEdit; QPushButton* quit = new QPushButton("&Quit"); QObject::connect(quit, SIGNAL(clicked()), qapp, SLOT(quit())); QVBoxLayout* layout = new QVBoxLayout; layout->addwidget(quit); layout->addwidget(te); QWidget window; window.setlayout(layout); window.show(); return app.exec(); }

18 Writing your own slot In order to make your own slots, you need to make a custom QWidget class In addition to public and private functions and members, QObjects have public and private slots A slot is just a function that gets called whenever a signal connected to it is sent Example: ask-quit

19 Outline 1

20 Toolbars QMainWindow is a class for making standard s with menus and setcentralwidget() sets the widget that fills the window menubar() returns a pointer to the menubar, which you can use to add new menus addtoolbar() creates a new toolbar To avoid repeating a lot of code, you can add a QAction to both a menu and a toolbar Then you can connect that one action to various slots Example: menus

21 Outline 1

22 Sending Data Between Signals and Slots So far, we ve used predefined signals e.g. QPushButton::clicked() e.g. QAction::triggered() connect() dictates which signals trigger which slots e.g. openaction::triggered() executes Notepad::open() Custom slots were responsible for gathering data Notepad::open() promped user to select file Grabbed filename Tried to open; complained if it couldn t Loaded file contents into QTextEdit instance Another approach: have signals send data to slots Solution: declare your own signals!

23 Sending Data Between Signals and Slots You can declare your own signals in the signals: section of your header files Then, custom slots can emit these signals: emit signal-name(); You don t actually implement signals, just declare, emit, and connect them Signals can carry data, just add parameters Connect that signal to a slot that takes the same arguments The slot will be called with the data you use when you emit the signal Example: title

24 Outline 1

25 -creator makes an IDE for developing s:

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

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

C++ GUI Programming with Qt 3

C++ GUI Programming with Qt 3 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

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-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

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

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

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

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

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

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

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

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

COS2614. Tutorial letter 203/1/2018. Programming: Contemporary Concepts. Semester 1. School of Computing. Discussion of Solutions to Assignment 3

COS2614. Tutorial letter 203/1/2018. Programming: Contemporary Concepts. Semester 1. School of Computing. Discussion of Solutions to Assignment 3 COS2614/203/1/2018 Tutorial letter 203/1/2018 Programming: Contemporary Concepts COS2614 Semester 1 School of Computing Discussion of Solutions to Assignment 3 CONTENTS Page 1 INTRODUCTION... 3 2 TUTORIAL

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

OpenGL Introduction Computer Graphics and Visualization

OpenGL Introduction Computer Graphics and Visualization Fall 2009 2 OpenGL OpenGL System Interaction Portable Consistent visual display regardless of hardware, OS and windowing system Callable from Ada, C, C++, Fortran, Python, Perl and Java Runs on all major

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

Introduction to CGAL. Constantinos Tsirogiannis. TU/Eindhoven

Introduction to CGAL. Constantinos Tsirogiannis. TU/Eindhoven TU/Eindhoven CGAL? CGAL = Computational Geometry Algorithms Library: CGAL? CGAL = Computational Geometry Algorithms Library: A library of Geometric algorithms and data structures. CGAL? CGAL = Computational

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

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

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

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

Lab 1 The Basics of Qt

Lab 1 The Basics of Qt Qt in Education Lab 1 The Basics of Qt Aim: Duration: This lab will take you through all the steps required to build a fully fledged Qt application. The focus is to understand how a Qt application is structured

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

Qt Essentials - Application Creation Module

Qt Essentials - Application Creation 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: Main Windows Settings Resources

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

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

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

CSC111 Computer Science II

CSC111 Computer Science II CSC111 Computer Science II Lab 1 Getting to know Linux Introduction The purpose of this lab is to introduce you to the command line interface in Linux. Getting started In our labs If you are in one of

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

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

C Compilation Model. Comp-206 : Introduction to Software Systems Lecture 9. Alexandre Denault Computer Science McGill University Fall 2006

C Compilation Model. Comp-206 : Introduction to Software Systems Lecture 9. Alexandre Denault Computer Science McGill University Fall 2006 C Compilation Model Comp-206 : Introduction to Software Systems Lecture 9 Alexandre Denault Computer Science McGill University Fall 2006 Midterm Date: Thursday, October 19th, 2006 Time: from 16h00 to 17h30

More information

Unix Philosophy, Text Editors, IDEs

Unix Philosophy, Text Editors, IDEs Philosophy, Text Editors, IDEs Comp Sci 1585 Data Structures Lab: Tools for Computer Scientists Outline 1 2 3 4 5 Excerpts from the Write programs to handle text streams, because that is a universal interface.

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

LECTURE 17. GUI Programming

LECTURE 17. GUI Programming LECTURE 17 GUI Programming GUI PROGRAMMING IN PYTHON There are a number of platform-independent GUI toolkits available including: Tkinter wrapper around Tcl/Tk. PyQt Python bindings for the Qt C++ framework.

More information

Tutorial 1 C Tutorial: Pointers, Strings, Exec

Tutorial 1 C Tutorial: Pointers, Strings, Exec TCSS 422: Operating Systems Institute of Technology Spring 2017 University of Washington Tacoma http://faculty.washington.edu/wlloyd/courses/tcss422 Tutorial 1 C Tutorial: Pointers, Strings, Exec The purpose

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

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

OpenGL and Qt Creator: a Gentle Introduction

OpenGL and Qt Creator: a Gentle Introduction OpenGL and Qt Creator: a Gentle Introduction Comp175: Introduction to Computer Graphics Fall 201 September 9th, 2011 1 Introduction In this lab 1 you will take your first steps into the world of OpenGL

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

LECTURE 18 GUI Programming Part 2

LECTURE 18 GUI Programming Part 2 LECTURE 18 GUI Programming Part 2 BASIC PYQT Last lecture, we created a basic PyQt4 application which had a few buttons and a menu bar. import sys from PyQt4 import QtGui, QtCore class Example(QtGui.QMainWindow):

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

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

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

Reviewing gcc, make, gdb, and Linux Editors 1

Reviewing gcc, make, gdb, and Linux Editors 1 Reviewing gcc, make, gdb, and Linux Editors 1 Colin Gordon csgordon@cs.washington.edu University of Washington CSE333 Section 1, 3/31/11 1 Lots of material borrowed from 351/303 slides Colin Gordon (University

More information

Computer Science 2500 Computer Organization Rensselaer Polytechnic Institute Spring Topic Notes: C and Unix Overview

Computer Science 2500 Computer Organization Rensselaer Polytechnic Institute Spring Topic Notes: C and Unix Overview Computer Science 2500 Computer Organization Rensselaer Polytechnic Institute Spring 2009 Topic Notes: C and Unix Overview This course is about computer organization, but since most of our programming is

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

Recitation 2/18/2012

Recitation 2/18/2012 15-213 Recitation 2/18/2012 Announcements Buflab due tomorrow Cachelab out tomorrow Any questions? Outline Cachelab preview Useful C functions for cachelab Cachelab Part 1: you have to create a cache simulator

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

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

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

PRINCIPLES OF OPERATING SYSTEMS

PRINCIPLES OF OPERATING SYSTEMS PRINCIPLES OF OPERATING SYSTEMS Tutorial-1&2: C Review CPSC 457, Spring 2015 May 20-21, 2015 Department of Computer Science, University of Calgary Connecting to your VM Open a terminal (in your linux machine)

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

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

CSE 333 Midterm Exam 7/29/13

CSE 333 Midterm Exam 7/29/13 Name There are 5 questions worth a total of 100 points. Please budget your time so you get to all of the questions. Keep your answers brief and to the point. The exam is closed book, closed notes, closed

More information

ECE 449 OOP and Computer Simulation Lecture 11 Design Patterns

ECE 449 OOP and Computer Simulation Lecture 11 Design Patterns ECE 449 Object-Oriented Programming and Computer Simulation, Fall 2017, Dept. of ECE, IIT 1/60 ECE 449 OOP and Computer Simulation Lecture 11 Design Patterns Professor Jia Wang Department of Electrical

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

Creating a Shell or Command Interperter Program CSCI411 Lab

Creating a Shell or Command Interperter Program CSCI411 Lab Creating a Shell or Command Interperter Program CSCI411 Lab Adapted from Linux Kernel Projects by Gary Nutt and Operating Systems by Tannenbaum Exercise Goal: You will learn how to write a LINUX shell

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

Chapter 11 Introduction to Programming in C

Chapter 11 Introduction to Programming in C C: A High-Level Language Chapter 11 Introduction to Programming in C Original slides from Gregory Byrd, North Carolina State University Modified slides by Chris Wilcox, Colorado State University! Gives

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

switch case Logic Syntax Basics Functionality Rules Nested switch switch case Comp Sci 1570 Introduction to C++

switch case Logic Syntax Basics Functionality Rules Nested switch switch case Comp Sci 1570 Introduction to C++ Comp Sci 1570 Introduction to C++ Outline 1 Outline 1 Outline 1 switch ( e x p r e s s i o n ) { case c o n s t a n t 1 : group of statements 1; break ; case c o n s t a n t 2 : group of statements 2;

More information

Programming the DMCC in C

Programming the DMCC in C Programming the DMCC in C Task This tutorial will teach you how to write your first program on a dual motor control cape (DMCC) through the BeagleBone microcontroller. The DMCC is a stackable board that

More information

Chapter 11 Introduction to Programming in C

Chapter 11 Introduction to Programming in C Chapter 11 Introduction to Programming in C C: A High-Level Language Gives symbolic names to values don t need to know which register or memory location Provides abstraction of underlying hardware operations

More information

Chapter 11 Introduction to Programming in C

Chapter 11 Introduction to Programming in C C: A High-Level Language Chapter 11 Introduction to Programming in C Original slides from Gregory Byrd, North Carolina State University Modified slides by Chris Wilcox, Colorado State University Gives

More information

Marble Developers Guide

Marble Developers Guide Marble Developers Guide Dennis Nienhüser August 16th, 2014 Contents 1 Building Marble 3 1.1 Obtaining the Source Code..................... 4 1.2 Source Code Organization...................... 5 1.3 CMake

More information

Oregon State University School of Electrical Engineering and Computer Science. CS 261 Recitation 1. Spring 2011

Oregon State University School of Electrical Engineering and Computer Science. CS 261 Recitation 1. Spring 2011 Oregon State University School of Electrical Engineering and Computer Science CS 261 Recitation 1 Spring 2011 Outline Using Secure Shell Clients GCC Some Examples Intro to C * * Windows File transfer client:

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

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

CS354 gdb Tutorial Written by Chris Feilbach

CS354 gdb Tutorial Written by Chris Feilbach CS354 gdb Tutorial Written by Chris Feilbach Purpose This tutorial aims to show you the basics of using gdb to debug C programs. gdb is the GNU debugger, and is provided on systems that

More information

CS 220: Introduction to Parallel Computing. Input/Output. Lecture 7

CS 220: Introduction to Parallel Computing. Input/Output. Lecture 7 CS 220: Introduction to Parallel Computing Input/Output Lecture 7 Input/Output Most useful programs will provide some type of input or output Thus far, we ve prompted the user to enter their input directly

More information

Higher-Performance R Programming with C++ Extensions

Higher-Performance R Programming with C++ Extensions Higher-Performance R Programming with C++ Extensions Part 6: RInside Dirk Eddelbuettel June 28 and 29, 2017 University of Zürich & ETH Zürich Zürich R Courses 2017 1/24 Overview Zürich R Courses 2017 2/24

More information

Getting to know you. Anatomy of a Process. Processes. Of Programs and Processes

Getting to know you. Anatomy of a Process. Processes. Of Programs and Processes Getting to know you Processes A process is an abstraction that supports running programs A sequential stream of execution in its own address space A process is NOT the same as a program! So, two parts

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

Chapter 11 Introduction to Programming in C

Chapter 11 Introduction to Programming in C Chapter 11 Introduction to Programming in C C: A High-Level Language Gives symbolic names to values don t need to know which register or memory location Provides abstraction of underlying hardware operations

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

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

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

Lecture 15a Persistent Memory & Shared Pointers

Lecture 15a Persistent Memory & Shared Pointers Lecture 15a Persistent Memory & Shared Pointers Dec. 5 th, 2017 Jack Applin, Guest Lecturer 2017-12-04 CS253 Fall 2017 Jack Applin & Bruce Draper 1 Announcements PA9 is due today Recitation : extra help

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

G52CPP C++ Programming Lecture 3. Dr Jason Atkin

G52CPP C++ Programming Lecture 3. Dr Jason Atkin G52CPP C++ Programming Lecture 3 Dr Jason Atkin E-Mail: jaa@cs.nott.ac.uk 1 Revision so far C/C++ designed for speed, Java for catching errors Java hides a lot of the details (so can C++) Much of C, C++

More information

Incoming Exam. CS 201 Introduction to Pointers. What is a Pointer? Pointers and Addresses. High Speed Memory (RAM) Size of Variable Types.

Incoming Exam. CS 201 Introduction to Pointers. What is a Pointer? Pointers and Addresses. High Speed Memory (RAM) Size of Variable Types. Incoming Exam CS 0 Introduction to Pointers Debzani Deb Next Monday (th March), we will have Exam # Closed book Sit with an empty space in either side of you Calculators that have text-allowing is not

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

Qtopia Core 4.2 Whitepaper

Qtopia Core 4.2 Whitepaper Qtopia Core 4.2 Whitepaper ABSTRACT This whitepaper describes the Qtopia Core C++ framework for GUI infrastructure and application development on embedded devices. It runs on any device supported by Linux

More information

Computer Science 322 Operating Systems Mount Holyoke College Spring Topic Notes: C and Unix Overview

Computer Science 322 Operating Systems Mount Holyoke College Spring Topic Notes: C and Unix Overview Computer Science 322 Operating Systems Mount Holyoke College Spring 2010 Topic Notes: C and Unix Overview This course is about operating systems, but since most of our upcoming programming is in C on a

More information

Slide Set 9. for ENCM 335 in Fall Steve Norman, PhD, PEng

Slide Set 9. for ENCM 335 in Fall Steve Norman, PhD, PEng Slide Set 9 for ENCM 335 in Fall 2018 Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary October 2018 ENCM 335 Fall 2018 Slide Set 9 slide 2/32

More information

Ch. 11: References & the Copy-Constructor. - continued -

Ch. 11: References & the Copy-Constructor. - continued - Ch. 11: References & the Copy-Constructor - continued - const references When a reference is made const, it means that the object it refers cannot be changed through that reference - it may be changed

More information

This whitepaper describes the Qt C++ framework. Qt supports the development of crossplatform GUI applications with its write once, compile anywhere

This whitepaper describes the Qt C++ framework. Qt supports the development of crossplatform GUI applications with its write once, compile anywhere This whitepaper describes the Qt C++ framework. Qt supports the development of crossplatform GUI applications with its write once, compile anywhere approach. Using a single source tree and a simple recompilation,

More information

CS 237 Meeting 19 10/24/12

CS 237 Meeting 19 10/24/12 CS 237 Meeting 19 10/24/12 Announcements 1. Midterm: New date: Oct 29th. In class open book/notes. 2. Try to complete the linear feedback shift register lab in one sitting (and please put all the equipment

More information

CSE 333 Lecture 6 - data structures

CSE 333 Lecture 6 - data structures CSE 333 Lecture 6 - data structures Hal Perkins Department of Computer Science & Engineering University of Washington Administrivia Exercises: - ex5 is out: clean up the code from section yesterday, split

More information

Chapter 11 Introduction to Programming in C

Chapter 11 Introduction to Programming in C Chapter 11 Introduction to Programming in C Original slides from Gregory Byrd, North Carolina State University Modified by Chris Wilcox, Yashwant Malaiya Colorado State University C: A High-Level Language

More information

Creating Dynamic UIs with Qt Declarative UI

Creating Dynamic UIs with Qt Declarative UI Creating Dynamic UIs with Qt Declarative UI Alex Luddy 8/25/2010 Purpose To inspire your usage of Qt s declarative UI Show how to use it Show how cool it is 1 Agenda Why Declarative UI? Examples Things

More information

Midterm Exam 2 Solutions C Programming Dr. Beeson, Spring 2009

Midterm Exam 2 Solutions C Programming Dr. Beeson, Spring 2009 Midterm Exam 2 Solutions C Programming Dr. Beeson, Spring 2009 April 16, 2009 Instructions: Please write your answers on the printed exam. Do not turn in any extra pages. No interactive electronic devices

More information

Test-Driven Development with Qt and KDE

Test-Driven Development with Qt and KDE Test-Driven Development with Qt and KDE Kevin Ottens Kevin Ottens Test-Driven Development with Qt and KDE 1/45 Introduction Goals Discover the possibilities of the Qt and KDE frameworks Practice Test-Driven

More information

Call-by-Type Functions in C++ Command-Line Arguments in C++ CS 16: Solving Problems with Computers I Lecture #5

Call-by-Type Functions in C++ Command-Line Arguments in C++ CS 16: Solving Problems with Computers I Lecture #5 Call-by-Type Functions in C++ Command-Line Arguments in C++ CS 16: Solving Problems with Computers I Lecture #5 Ziad Matni Dept. of Computer Science, UCSB Administrative CHANGED T.A. OFFICE/OPEN LAB HOURS!

More information

MEIN 50010: Python Introduction

MEIN 50010: Python Introduction : Python Fabian Sievers Higgins Lab, Conway Institute University College Dublin Wednesday, 2017-10-04 Outline Goals Teach basic programming concepts Apply these concepts using Python Use Python Packages

More information

3L Diamond. Multiprocessor DSP RTOS

3L Diamond. Multiprocessor DSP RTOS 3L Diamond Multiprocessor DSP RTOS What is 3L Diamond? Diamond is an operating system designed for multiprocessor DSP applications. With Diamond you develop efficient applications that use networks of

More information

CSE au Midterm Exam Nov. 2, 2018 Sample Solution

CSE au Midterm Exam Nov. 2, 2018 Sample Solution Question 1. (16 points) Build tools and make. We re building a C++ software back-end prototype for a new food web site. So far, we ve got the following source files with the code for two main programs

More information

Program Organization and Comments

Program Organization and Comments C / C++ PROGRAMMING Program Organization and Comments Copyright 2013 Dan McElroy Programming Organization The layout of a program should be fairly straight forward and simple. Although it may just look

More information