SlideServe
Menu
Préférences
© SlideServe · v2026

Introduction to Qt Programming

zocha avatar
15 diapositives · 362 Views · Aug 10, 2014

This presentation explores the need for GUI programming and the advantages of using Qt. It covers the basics of the Qt GUI toolkit, including widget types, signals and slots for object communication, and essential design practices for user-friendly interfaces. Learn how to create appealing front-ends for applications across various platforms. The session will feature code snippets and practical examples to illustrate key concepts, alongside references for further learning. Finally, a Q&A session will address any queries related to Qt programming.

Introduction to Qt Programming - slide 1
01 / 15Introduction to Qt Programming
1 / 17

Télécharger la présentation

Introduction to Qt Programming
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. Nitish Jaisoor Introduction to Qt Programming

  2. Agenda • The need for GUI programming • Why Qt? • Introduction to the Qt GUI toolkit • What's involved in GUI design • Part 1 – Widgets & the visible stuff • Part 2 – Signals & the hidden stuff • Part 3 – Code snippets • References • Q&A

  3. The need for GUI programming • The need to present all the options available to the user in an easy, pleasing style • Front ends to console based applications can make them easier to use • Linux newbies find GUIs very user friendly • Pictorial presentation of data is possible

  4. Why Qt? • Some common toolkits: GTK+, Qt, Tk, Visual Studio IDE. • Licensing issues • Cross platform portability • Object oriented design • Development language – C or C++? • Ease of learning • Well structured documentation

  5. Introduction to the Qt GUI toolkit • Developed by Trolltech AS • Based on OO C++ • Available for Linux, Win32, Mac OsX, Embedded • Basic C++ knowledge required • Qt Object model • Applications developed using Qt • Reference documentation • Useful tools – QtDesigner, qmake

  6. What's involved in GUI design • Obtain the requirements • List out the functionality required • Map the functionality to a GUI element • Group similar functional elements • Plan a user friendly layout • User friendliness: Error messages, Help dialogs • Connect the functions and GUI elements

  7. Part-1: Widgets & the visible stuff • A user interface object that can process user input and draw graphics • Properties of a widget • Types of widgets • Parent and child widgets

  8. Part-1 (cont.): Widget types

  9. Part 1 (cont.): Parents and children Main Widget (QWidget) Button 1 (QPushButton) Label (QLabel) Button 2 (QPushButton)

  10. Part 2: Signals & the hidden stuff • Signals and Slots provide an effective means of communication between objects • They provide the “functionality” to the widget element while hiding the actual processing Object 1 Signal 1 Signal 2 Object 2 Signal 1 Slot 1 Slot 1 Slot 2

  11. Part 2 (cont.): Signals and Slots Slot displayMessage() MessageLabel-> setText(“Welcome!”) Signal clicked() Slot qApp->quit() Signal clicked()

  12. Part 2 (cont.): Events and stuff • Events are delivered to objects when a certain event takes place • Strong support for events like mouse events, timer events, etc. • Timers enable the scheduling of events in an object

  13. Part 3: Code snippets • A simple widget • A widget with a label and 2 buttons • The above with signals and slots • A small timer application

  14. References • The Qt documentation – with the distribution or at http://www.trolltech.com • Programming with Qt – Matthias Kalle Dalheimer (O'Reilly) • OSS code – get them at sites like http://apps.kde.com

  15. Q&A • Contact information: nitish_jaisoor@infosys.com