QT graphical user interface framework

Slides:



Advertisements
Similar presentations
Lecture Computer Science I - Martin Hardwick Strings #include using namespace std; int main () { string word; cout
Advertisements

First Steps with Qt Julien Finet Kitware Inc. Jan. 05 th 2010.
CPSC 441 TUTORIAL – JANUARY 16, 2012 TA: MARYAM ELAHI INTRODUCTION TO C.
Chapter 12 Separate Compilation and Namespaces. Abstract Data Type (ADT) ADT: A data type consisting of data and their behavior. The abstraction is that.
Sven Johannsen C++ User Group Aachen 01/08/15
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.
QT – Introduction C++ GUI Programming with Qt 4 Blanchette and Summerfield, Ch. 1 Miller, 2004.
Dale Roberts Introduction to Visual Programming Dale Roberts, Lecturer Computer Science, IUPUI Department of Computer and.
Advanced Programming in the UNIX Environment Hop Lee.
Linux Qt Graphical User Interface (GUI) Development In this session, we will cover Qt GUI development tools including: Qt Creator for remote debug and.
QT Intro. 김기형
LAMAD Symbian Qt install and deploy Installing Qt SDK and deploying Qt applications.
Cross-platform approach to create the interactive application based on ROOT and Qt GUI libraries Rene Brun (CERN) Valeri Fine (BNL,
LAMAD Symbian Qt Symbian OS One of the first modern mobile operating systems Most popular smartphone OS until the end of 2010 Main Nokia OS.
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.
Blanchette and Summerfield, Ch. 2
1 INF160 IS Development Environments AUBG, COS dept Lecture 06 Title: Dev Env: Code::Blocks (Extract from Syllabus) Reference:
Josh Kilgore Obi Atueyi Tom Calloway Ye Tian 1 Software Engineering Spring 2010.
Cross-platform GUI Frameworks for 3D Apps and Games: Qt vs wxWidgets
1 CSC111H Graphical User Interfaces (GUIs) Introduction GUIs in Java Understanding Events A Simple Application The Containment Hierarchy Layout Managers.
FLTK Tutorial.
Using Qt for GUI development Brad Whitlock March 2002.
ITEC 320 C++ Examples.
1 Chapter 12 GUI C/C++ Language Programming Wanxiang Che.
CNS 1410 Graphical User Interfaces. Obectives Students should understand the difference between a procedural program and an Event Driven Program. Students.
Dale Roberts Introduction to Visual Programming Dale Roberts, Lecturer Computer Science, IUPUI Department of Computer and.
1 + 1 becomes 11 what does our software promise?.
GUI With GTK+ Under Linux Fanfan Xiong. Introduction GTK+ (GIMP toolkit) : A library for creating graphical user interfaces(GUI) Two examples developed.
CS-1030 Dr. Mark L. Hornick 1 Java Review Interactive.
-1- National Alliance for Medical Image Computing First Steps with Qt Julien Finet Kitware Inc. Jan. 05 th 2010.
Lin Chen 09/06/2011. Global variables const int maxCandidates = 10; // Names of the candidates participating in this state's primary string candidate[maxCandidates];
QT Programming QT Programming Ruku Roychowdhury. Background QT is a cross platform application framework. Widely used to develop GUI applications. Originally.
. 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.
QT – Introduction C++ GUI Programming with Qt 4
11 Introduction to Object Oriented Programming (Continued) Cats.
Brief Version of Starting Out with C++ Chapter 1 Introduction to Computers and Programming.
Dale Roberts Programming with Qt Dale Roberts, Lecturer Computer Science, IUPUI Department of Computer and Information Science,
C++ Namespaces, Exceptions CSci 588: Data Structures, Algorithms and Software Design All material not from online sources copyright © Travis Desell, 2011.
July FLTK The Fast Light Toolkit • A C++ graphical user interface toolkit • Can be used under X, Windows, MacOS • Supports OpenGL • Provides: – Interactive.
Linux CSE 1222 CSE1222: Lecture 1BThe Ohio State University1.
1. 2 Qt Toolkit ● C++ toolkit for cross-platform GUI application development – GUI functions (GUI = graphical user interface) – Data access components,
Introduction to Qt4 Diego Iastrubni - (only 71 slides!)
C++ First Steps.
Mobile Application Development with MeeGo™ - Touch Apps & UI Design
Mark Redekopp David Kempe
MT262A Review.
Chapter 6 CS 3370 – C++ Functions.
Overview 4 major memory segments Key differences from Java stack
HCI/CHI: Computer-Human Interaction
Command Line Arguments
Jonathan Riddell Canonical Kubuntu Ubuntu KDE
CMPE 135: Object-Oriented Analysis and Design November 21 Class Meeting Department of Computer Engineering San Jose State University Fall 2017 Instructor:
CMPE Data Structures and Algorithms in C++ December 7 Class Meeting
Mobile Application Development with MeeGo™ - Programming with SDK
Qt Programming.
C++ Functions, Classes, and Templates
Overview 4 major memory segments Key differences from Java stack
The Designer.
Custom Widgets & Events
GTK + Programming.
A multi-platform GUI-building program
Go4 GUI and GSI's QtROOT interface
Pointers and dynamic objects
Go4 GUI and GSI's QtROOT interface
A multi-platform GUI-building program
ENERGY 211 / CME 211 Lecture 29 December 3, 2008.
Presentation transcript:

QT graphical user interface framework Lecture Material QT graphical user interface framework

Multiplatform GUI (Graphical User Interface) library QT Multiplatform GUI (Graphical User Interface) library Available at https://www.qt.io/ Single API (Application Programming Interface) used in multiple environments (Unix, Windows, Mac) Adaptation to a different environment requires only a recompilation Compilation in multiple environment makes it easier to detect errors not surfacing when working with a given compiler under a given operating system Look of the application consistent with other programs working in given environment

Simple Button Simple button: Compilation: #include <QApplication> #include <QPushButton> int main(int argc, char *argv[]) { QApplication app(argc, argv); QPushButton hello("Hello world!"); hello.resize(100, 30); hello.show(); return app.exec(); } qmake -project qmake QT+=widgets make

Widget Visible user interface component Shorthand for window gadget Buttons, menus, frames, sliders are all widgets Widget can contain other widgets

Parent and Child Widgets Widget without a parent is always a separate window The remaining widgets are displayed inside the parent widget The parent widget will free the resources allocated by its child widgets

Signals and Slots #include <QObject> class Counter : public QObject { Q_OBJECT public: Counter() { m_value = 0; } int value() const { return m_value; } public slots: void setValue(int value); signals: void valueChanged(int newValue); private: int m_value; }; #include "sigslots.h" #include <iostream> using namespace std; void Counter::setValue(int value) { if (value != m_value) { m_value = value; emit valueChanged(value); } int main() Counter a, b; QObject::connect(&a, SIGNAL(valueChanged(int)), &b, SLOT(setValue(int))); a.setValue(12); cout << "a="<<a.value()<<",b="<<b.value()<<endl; b.setValue(48);

Internationalization Mark texts for translation: Install the translator in the program: Modify the project file: Extract strings: lupdate Provide translations: linguist Compile the database: lrelease QPushButton(tr("Quit")); #include <QtGui> ... int main(int argc, char *argv[]) { QApplication app(argc, argv); QString locale = QLocale::system().name(); QTranslator translator; translator.load(QString("app_") + locale); app.installTranslator(&translator); TRANSLATIONS=app_pl.ts