SlideShare a Scribd company logo
1 of 36
Download to read offline
Qt UI Development



Andreas Jakl
Senior Technical Consultant
Forum Nokia

                              23 October, 2010
                                        v3.2.0
Contents
  – Ways of creating user interfaces with Qt
  – Subclassing Widgets (Signals & Slots, continued)
  – Dialogs
  – Main Window
  – Menus, Toolbars and Actions
User Interfaces with Qt
Qt & Graphics
β€’ Available options
   – Traditional widgets
   – Custom widgets and QPainter
   – QGraphicsView
   – QGLWidget
   – Qt Quick
   – QtWebKit
Traditional Qt Widgets
β€’ QWidget as base of UI components in Qt
   – Window management, layouts
   – Use native UI design
   – Support style sheets
   – Ex.: QPushButton,
      QLabel, QLineEdit
Traditional Qt Widgets
β€’ UI Designer support
   – Instant preview, drag & drop UI
   – Integrated even with translator tool



           High level
           Exactly the same code on all platforms


        Less customization possible, UI effects difficult
        Smaller UI, different paradigms
QWidget and QPainter
β€’ Draw manually using QPainter
   – On QWidget surfaces
   – Flexible painting: text, gradients, polygons,
      bezier curves, transparencies, etc.

           Lets you express your painting directly
           Traditional



        Makes you express your painting directly
QGraphicsView
β€’   Manage 2D scenes with a scene graph
     – Can manage thousands of items with hierarchies
     – Collision detection, affine transformations,
       drag and drop support
     – Hardware acceleration and integration with QWidget possible


               High level
               Conceptually nice and flexible



           No ready-made common UI components available yet
MeeGo Touch
β€’ UI Framework based on QGraphicsView
   – Provides common UI components with
     theme support
   – Integrates transitions and effects

           Great graphics effects, theme support
           Easy to create smooth UIs
           Already available from source repositories


        Still in development
QGLWidget
     β€’ Very low level
             – Basic setup by Qt
             – You do the hard work                                              Angry Birds and Bounce
                                                                                 by Rovio




                           Complete control over GL
                           Good if you have existing codebase & assets, cross-platform


                      OpenGL is hard work (but there’s more Qt coming for that *)
                      No Qt OpenGL for Symbian integration in Qt 4.7.0
* http://doc.qt.nokia.com/qt3d-snapshot/index.html
Qt Quick
    β€’ Several components
              – QML language and JavaScript
              – Declarative syntax, animations and states integrated
              – Available in Qt 4.7+

                                 Very easy to make slick, fluid UIs
                                 Will soon be most important way to create mobile UIs


                          More tooling is on its way
                          Ready-made UI components on their way *
* Project page: http://bugreports.qt.nokia.com/browse/QTCOMPONENTS
Sample app to integrate web into Qt: http://wiki.forum.nokia.com/index.php/QtWebKitStub



   QtWebKit
   β€’ Open source browser engine
          – Display HTML(5) and JavaScript content
            through a QWidget
          – Combine Qt C++ and web code if needed to
            get best of both worlds

                       Use your existing web skills to create the UI
                       Reuse web components (online help, etc.)


                   Complex UIs and interaction probably more difficult
                   Less performance than native code (but improving)
How to Choose?
β€’ Depends on
   – Complexity of your UI
   – Existing code/assets
   – Experience with low level code
   – Which devices you’re targeting
   – Your timeframe
β€’ Mix and match as appropriate!
Subclassing Widgets
Signal and Slots, Continued
β€’ How to accomplish the following?




    QObject::connect(button, SIGNAL(clicked()),
                     label, SLOT(setText("new text")));

    doesn’t work that way, clicked()-signal doesn’t give required number
      of arguments to setText()-slot.
Custom Widgets (Slots)
β€’ Commonly used: subclass widgets to extend functionality
   – Class MyWindow is a widget (parent)
   – Also manages child widgets
β€’ Widget adds new slot
   – Put text to display into this slot method
      instead of the connect statement
myWindow.h                            myWindow.cpp                               #include <QtGui/QApplication>
                                                                                 #include "MyWindow.h"
 #ifndef MYWINDOW_H                   #include "MyWindow.h"
                                                                                 int main(int argc, char *argv[])
 #define MYWINDOW_H                                                              {
                                      MyWindow::MyWindow(QWidget* parent)            QApplication a(argc, argv);
 #include    <QWidget>                    :                                          MyWindow* window = new MyWindow();
                                                                                     window->show();
 #include    <QVBoxLayout>                QWidget(parent)                            return a.exec();
 #include    <QPushButton>            {                                          }
 #include    <QLabel>                     label = new QLabel("old text");
 #include    <QObject>                    button0 = new QPushButton("Update labels");                            main.cpp
                                          button1 = new QPushButton("Exit");
 class MyWindow : public QWidget
 {                                         layout = new QVBoxLayout(this);
     Q_OBJECT                              layout->addWidget(button0);
 public:                                   layout->addWidget(button1);
     MyWindow(QWidget *parent = 0);        layout->addWidget(label);
                                           setLayout(layout);
 private:
     QLabel* label;                        connect(button0, SIGNAL(clicked()),
     QPushButton* button0;                         this, SLOT(setText()));
     QPushButton* button1;                 connect(button1, SIGNAL(clicked()),
     QVBoxLayout* layout;                          this, SLOT(close()));
                                      }
 private slots:
     void setText();                  void MyWindow::setText()
 };                                   {
                                          label->setText("new text");
 #endif // MYWINDOW_H                 }
Dialogs
Dialogs                                                          QObject               QPaintDevice


β€’   Dialog is:
                                                                             QWidget
      –   Top-level window
      –   Used for short-term tasks, brief user communication
      –   Can provide return value                                           QDialog
β€’   Modal
      –   Dialog blocks other application windows (e.g., file open dialog)
      –   Usually called with exec(), returns when dialog is closed
      –   Call with show(): returns immediately, get results via signals
β€’   Modeless
      –   Operates independently from other windows
          (e.g., find & replace dialog)
      –   Always called with show(): returns immediately
Custom Dialog
  clicked() signal from button in main widget triggers dialog
  Change label in main widget depending on user action selected in dialog
Signals & Slots Diagram
    Signals                               Signals
   clicked()                              clicked()


    Slots                                 Slots

                  Slots      Signals
                 exec(int)
                 accept()    accepted()
                 reject()    rejected()
    Signals                               Signals
   clicked()


    Slots                                  Slots
                                          checkInputDialog()
The Dialog
myDialog.h                         myDialog.cpp
 #ifndef MYDIALOG_H                 #include "mydialog.h"
 #define MYDIALOG_H
                                    MyDialog::MyDialog()
 #include    <QDialog>              {
 #include    <QPushButton>              setFixedSize(150, 100);
 #include    <QVBoxLayout>              QVBoxLayout* vbox = new QVBoxLayout();
 #include    <QLabel>                   QLabel* label = new QLabel("Please confirm.");
                                        QPushButton* okButton = new QPushButton("Ok");
 class MyDialog : public QDialog        QPushButton* cancelButton = new QPushButton("Cancel");
 {
     Q_OBJECT                            // Set the ok button as default
 public:                                 okButton->setDefault(true);
     MyDialog();                         vbox->addWidget(label);
 };                                      vbox->addWidget(okButton);
                                         vbox->addWidget(cancelButton);
 #endif // MYDIALOG_H                    setLayout(vbox);

                                         // Connect the buttons to slots defined by QDialog
                                         connect(okButton, SIGNAL(clicked()),
                                                 this, SLOT(accept()));
                                         connect(cancelButton, SIGNAL(clicked()),
                                                 this, SLOT(reject()));
                                    }
QDialog Base Class
Slot                        Description
virtual void accept()       Hides the dialog and sets the result code to Accepted (1).

virtual void reject()       Hides the dialog and sets the result code to Rejected (0).

virtual void done(int r)    Closes the dialog and sets return value to r.
                            If the dialog is started via exec(), done() causes the event loop to finish, and exec() to return r.
                            Deletes the dialog if Qt::WA_DeleteOnClose is set.
int exec()                  Shows the dialog as a modal dialog, blocking until the user closes it. Returns dialog return value
                            (DialogCode) like Accepted or Rejected.

Signal                      Description
void accepted()             Emitted when dialog has been accepted through calling accept() or done() with the argument
                            QDialog::Accepted
void rejected()             Emitted when dialog has been rejected through calling reject() or done() with the argument
                            QDialog::Rejected
void finished(int result)   Emitted when the dialog’s result code has been set (setResult()) and either accept(), reject() or
                            done() is called.
The Widget
 mywidget.h                            mywidget.cpp
  [...]                                 #include "mywidget.h"

  class MyWidget : public QWidget       MyWidget::MyWidget(QWidget *parent) : QWidget(parent) {
  {                                         setWindowTitle("Main Window - Dialog Example");
      Q_OBJECT                              startButton = new QPushButton("Start dialog");
                                            instructionsLabel = new QLabel("Please push the button");
  public:                                   resultLabel = new QLabel();
      MyWidget(QWidget *parent = 0);
      ~MyWidget();                          layout = new QVBoxLayout(this);
                                            layout->addWidget(instructionsLabel);
  private slots:                            layout->addWidget(startButton);
      void checkInputDialog();              layout->addWidget(resultLabel);

  private:                                  dialog = new MyDialog();
      QPushButton* startButton;
      QLabel* instructionsLabel;            connect(startButton, SIGNAL(clicked()),
      QLabel* resultLabel;                          dialog, SLOT(exec()));
      QVBoxLayout* layout;                  connect(dialog, SIGNAL(accepted()),
      MyDialog* dialog;                             this, SLOT(checkInputDialog()));
                                            connect(dialog, SIGNAL(rejected()),
  };                                                this, SLOT(checkInputDialog()));
                                        }
  #endif // MYWIDGET_H
                                        void MyWidget::checkInputDialog() {
                                            int res = dialog->result(); // Gets result (Accepted/Rejected)
                                            if (res == QDialog::Accepted) {
                                                resultLabel->setText(""Ok" was selected");
                                            } else if (res == QDialog::Rejected) {
                                                resultLabel->setText(""Cancel" was selected");
                                            }
                                        }
Custom Return Values

mydialog.h
 [...]
 private slots:
     void setResult();
 [...]

mydialog.cpp
 [...]
     connect(ignoreButton, SIGNAL(clicked()),
             this, SLOT(setResult()));
 [...]
 void MyDialog::setResult()                     mywidget.cpp
 {
                                                 [...]
     int result = 99;
                                                     connect(dialog, SIGNAL(finished(int)),
     emit done(result);
                                                             this, SLOT(checkInputDialog(int)));
 }
                                                 [...]
                                                 void MyWidget::checkInputDialog(int res)
mywidget.h                                       {
 [...]                                               if (res == 99)
 private slots:                                      {
     void checkInputDialog();                            resultLabel->setText(""Ignore" was selected");
     void checkInputDialog(int);                     }
 [...]                                           }
Predefined Dialogs                         QColorDialog


                            QInputDialog
      QMessageBox




                     QFontDialog
QFileDialog



                                                          QErrorMessage
Predefined Dialogs
β€’ Example: Message box
   – Modal dialog
   – User selection β†’ return value

     int ret = QMessageBox::warning( this, "Exit?",
               "Do you really want to exit the application?",
               QMessageBox::Yes | QMessageBox::No );
Main Window, Menu, Action
Main Window
β€’   Provides main application window                     Menu Bar
     – Pre-defined layout for standard components                       Toolbars
     – Central widget must be defined, others
                                                                      Dock Widgets
       optional
     – Subclass to create your own implementation
                                                                      Central Widget
β€’   Differences?
     – Possible with dialog / widgets as well
     – But: more comfortable, consistent and efficient


                                                         Status Bar
Example - QMainWindow
mainwindow.h                                 mainwindow.cpp
  [...]                                       #include "mainwindow.h"

  class MainWindow : public QMainWindow       MainWindow::MainWindow(QWidget *parent, Qt::WFlags flags)
  {                                               : QMainWindow(parent, flags)
      Q_OBJECT                                {
                                                  editor = new QTextEdit();
  public:                                         setMinimumSize(160, 160);
      MainWindow(QWidget *parent = 0,             resize(480, 320);
                Qt::WFlags flags = 0);            setCentralWidget(editor);
      ~MainWindow();                              setWindowTitle("QMainWindow with Menus");

  private:                                        QString message = "Welcome";
      QTextEdit* editor;                          statusBar()->showMessage(message);
                                              }
  [...]
  };

  #endif // MAINWINDOW_H


                    main.cpp is similar to
                    the previous example
Action




                                                                         Image by Anna Cervova
                                                                            (Public Domain)
β€’ Represent abstract user interface           β€’ Stores
  action                                        information about
    – Define once, use in multiple               – Icons
      components                                 – Text
    – Inserted into widgets                      – Keyboard shortcut
        β€’   Menus
            (can create actions implicitly)
                                                 – Status text
        β€’   Toolbar buttons                      – β€œWhat’s This?” text
        β€’   Keyboard shortcuts
                                                 – Tooltip
Menu Bar
β€’   QMenu provides:
     –   a menu widget for menu bars, context menus
         and other popup menus
β€’   Supports:
     –   Triggered Items
     –   Separators
     –   Submenus
     –   Tear-off menus
β€’   QMenuBar automatically created by
    QMainWindow
β€’   QMenu(s) contains individual menu items (
    Actions)
Example – QAction
   mainwindow.h                mainwindow.cpp
    [...]                       [...]
                                    // Create a new β€œOpen” action with an icon, keyboard shortcut and
    class MainWindow                // info-text for the status bar.
        : public QMainWindow        openAct = new QAction("&Open...", this);
    {                               openAct->setIcon(QIcon("images/open.png"));
        Q_OBJECT                    openAct->setShortcut(tr("Ctrl+O"));
    [...]                           openAct->setStatusTip(tr("Open an existing file"));
                                    connect(openAct, SIGNAL(triggered()), this, SLOT(openFile()));
    private slots:
        void openFile();            // Add the action to the menu
                                    fileMenu = menuBar()->addMenu(tr("&File"));
    private:                        fileMenu->addAction(openAct);
        QMenu *fileMenu;
        QAction *openAct;       [...]
    };
                                void MainWindow::openFile()
                                {
                                    // Define two filter options – one for documents, one for all files
                                    // The filter mask is automatically parsed, β€œ;;” separates lines
                                    QString file = QFileDialog::getOpenFileName(this,
                                        "Please choose a file to open", QDir::homePath(),
                                        "Documents (*.pdf *.doc *.docx);;All files (*.*)");

                                    if (!file.isNull())
                                    {
                                        QString info("You chose this filen");
                                        info.append(file);
                                        QMessageBox::information(this, "Your Choice", info, QMessageBox::Ok);
                                    }
                                }
Toolbar
β€’ Same actions as for menu can be used for toolbar
β€’ Default automatically enables drag & drop
Example – QToolBar
   mainwindow.h                mainwindow.cpp
    [...]                       #include "mainwindow.h"

    class MainWindow            MainWindow::MainWindow(QWidget *parent, Qt::WFlags flags)
        : public QMainWindow        : QMainWindow(parent, flags) {
    {                           [...]
        Q_OBJECT                    // Open action
    [...]                           openAct = new QAction("&Open...", this);
                                    openAct->setIcon(QIcon("images/open.png"));
    private:                        openAct->setShortcut(tr("Ctrl+O"));
        QToolBar *toolFile;         openAct->setStatusTip(tr("Open an existing file"));
    };                              connect(openAct, SIGNAL(triggered()), this, SLOT(openFile()));

                                    // Exit action
                                    exitAct = new QAction("E&xit", this);
                                    exitAct->setIcon(QIcon("images/exit.png"));
                                    exitAct->setShortcut(tr("Ctrl+Q"));
                                    exitAct->setStatusTip(tr("Exit the application"));
                                    connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));

                                    // Create the file menu
                                    fileMenu = menuBar()->addMenu(tr("&File"));
                                    fileMenu->addAction(openAct);
                                    fileMenu->addSeparator();
                                    fileMenu->addAction(exitAct);

                                    // Add the actions to the toolbar
                                    toolFile = addToolBar("File");
                                    toolFile->addAction(openAct);
                                    toolFile->addAction(exitAct);
                                [...]
                                }
Thank You.

More Related Content

What's hot

Qt on Real Time Operating Systems
Qt on Real Time Operating SystemsQt on Real Time Operating Systems
Qt on Real Time Operating Systemsaccount inactive
Β 
Observer pattern with Stl, boost and qt
Observer pattern with Stl, boost and qtObserver pattern with Stl, boost and qt
Observer pattern with Stl, boost and qtDaniel Eriksson
Β 
Necessitas - Qt on Android - from FSCONS 2011
Necessitas - Qt on Android - from FSCONS 2011Necessitas - Qt on Android - from FSCONS 2011
Necessitas - Qt on Android - from FSCONS 2011Johan Thelin
Β 
Cross Platform Qt
Cross Platform QtCross Platform Qt
Cross Platform QtJohan Thelin
Β 
Qt for Python
Qt for PythonQt for Python
Qt for PythonICS
Β 
Untitled presentation(4)
Untitled presentation(4)Untitled presentation(4)
Untitled presentation(4)chan20kaur
Β 
OpenGL Fixed Function to Shaders - Porting a fixed function application to β€œm...
OpenGL Fixed Function to Shaders - Porting a fixed function application to β€œm...OpenGL Fixed Function to Shaders - Porting a fixed function application to β€œm...
OpenGL Fixed Function to Shaders - Porting a fixed function application to β€œm...ICS
Β 
Multithreading done right
Multithreading done rightMultithreading done right
Multithreading done rightPlatonov Sergey
Β 
Qt Internationalization
Qt InternationalizationQt Internationalization
Qt InternationalizationICS
Β 
Clockless design language - ilia greenblat
Clockless design language - ilia greenblatClockless design language - ilia greenblat
Clockless design language - ilia greenblatchiportal
Β 
Lockless Producer Consumer Threads: Asynchronous Communications Made Easy
Lockless Producer Consumer Threads: Asynchronous Communications Made EasyLockless Producer Consumer Threads: Asynchronous Communications Made Easy
Lockless Producer Consumer Threads: Asynchronous Communications Made EasyICS
Β 
εˆ†ζ•£εΌη³»η΅±
εˆ†ζ•£εΌη³»η΅±εˆ†ζ•£εΌη³»η΅±
εˆ†ζ•£εΌη³»η΅±acksinkwung
Β 
Translating Qt Applications
Translating Qt ApplicationsTranslating Qt Applications
Translating Qt Applicationsaccount inactive
Β 
Petri Niemi Qt Advanced Part 2
Petri Niemi Qt Advanced Part 2Petri Niemi Qt Advanced Part 2
Petri Niemi Qt Advanced Part 2NokiaAppForum
Β 
Best Practices in Qt Quick/QML - Part III
Best Practices in Qt Quick/QML - Part IIIBest Practices in Qt Quick/QML - Part III
Best Practices in Qt Quick/QML - Part IIIICS
Β 
QVariant, QObject β€” Qt's not just for GUI development
QVariant, QObject β€” Qt's not just for GUI developmentQVariant, QObject β€” Qt's not just for GUI development
QVariant, QObject β€” Qt's not just for GUI developmentICS
Β 
Best Practices in Qt Quick/QML - Part 3
Best Practices in Qt Quick/QML - Part 3Best Practices in Qt Quick/QML - Part 3
Best Practices in Qt Quick/QML - Part 3ICS
Β 

What's hot (20)

The Future of Qt Widgets
The Future of Qt WidgetsThe Future of Qt Widgets
The Future of Qt Widgets
Β 
Qt on Real Time Operating Systems
Qt on Real Time Operating SystemsQt on Real Time Operating Systems
Qt on Real Time Operating Systems
Β 
Qt Workshop
Qt WorkshopQt Workshop
Qt Workshop
Β 
Observer pattern with Stl, boost and qt
Observer pattern with Stl, boost and qtObserver pattern with Stl, boost and qt
Observer pattern with Stl, boost and qt
Β 
Necessitas - Qt on Android - from FSCONS 2011
Necessitas - Qt on Android - from FSCONS 2011Necessitas - Qt on Android - from FSCONS 2011
Necessitas - Qt on Android - from FSCONS 2011
Β 
Cross Platform Qt
Cross Platform QtCross Platform Qt
Cross Platform Qt
Β 
Qt for Python
Qt for PythonQt for Python
Qt for Python
Β 
Untitled presentation(4)
Untitled presentation(4)Untitled presentation(4)
Untitled presentation(4)
Β 
OpenGL Fixed Function to Shaders - Porting a fixed function application to β€œm...
OpenGL Fixed Function to Shaders - Porting a fixed function application to β€œm...OpenGL Fixed Function to Shaders - Porting a fixed function application to β€œm...
OpenGL Fixed Function to Shaders - Porting a fixed function application to β€œm...
Β 
Multithreading done right
Multithreading done rightMultithreading done right
Multithreading done right
Β 
Qt for beginners
Qt for beginnersQt for beginners
Qt for beginners
Β 
Qt Internationalization
Qt InternationalizationQt Internationalization
Qt Internationalization
Β 
Clockless design language - ilia greenblat
Clockless design language - ilia greenblatClockless design language - ilia greenblat
Clockless design language - ilia greenblat
Β 
Lockless Producer Consumer Threads: Asynchronous Communications Made Easy
Lockless Producer Consumer Threads: Asynchronous Communications Made EasyLockless Producer Consumer Threads: Asynchronous Communications Made Easy
Lockless Producer Consumer Threads: Asynchronous Communications Made Easy
Β 
εˆ†ζ•£εΌη³»η΅±
εˆ†ζ•£εΌη³»η΅±εˆ†ζ•£εΌη³»η΅±
εˆ†ζ•£εΌη³»η΅±
Β 
Translating Qt Applications
Translating Qt ApplicationsTranslating Qt Applications
Translating Qt Applications
Β 
Petri Niemi Qt Advanced Part 2
Petri Niemi Qt Advanced Part 2Petri Niemi Qt Advanced Part 2
Petri Niemi Qt Advanced Part 2
Β 
Best Practices in Qt Quick/QML - Part III
Best Practices in Qt Quick/QML - Part IIIBest Practices in Qt Quick/QML - Part III
Best Practices in Qt Quick/QML - Part III
Β 
QVariant, QObject β€” Qt's not just for GUI development
QVariant, QObject β€” Qt's not just for GUI developmentQVariant, QObject β€” Qt's not just for GUI development
QVariant, QObject β€” Qt's not just for GUI development
Β 
Best Practices in Qt Quick/QML - Part 3
Best Practices in Qt Quick/QML - Part 3Best Practices in Qt Quick/QML - Part 3
Best Practices in Qt Quick/QML - Part 3
Β 

Viewers also liked

了解 Qt
了解 Qt了解 Qt
了解 QtChi Zhang
Β 
Accelerating performance on Qt and WebKit for the MIPS architecture
Accelerating performance on Qt and WebKit for the MIPS architectureAccelerating performance on Qt and WebKit for the MIPS architecture
Accelerating performance on Qt and WebKit for the MIPS architectureaccount inactive
Β 
Designing and Building (Your Own) UI Frameworks For the Enterprise
Designing and Building (Your Own) UI Frameworks For the EnterpriseDesigning and Building (Your Own) UI Frameworks For the Enterprise
Designing and Building (Your Own) UI Frameworks For the EnterpriseExoLeaders.com
Β 
Maemo 6 UI Framework
Maemo 6 UI FrameworkMaemo 6 UI Framework
Maemo 6 UI FrameworkPeter Schneider
Β 
OVERVIEW: Chromium Source Tree
OVERVIEW: Chromium Source TreeOVERVIEW: Chromium Source Tree
OVERVIEW: Chromium Source TreeChang W. Doh
Β 
Charity apprentice logo-blue-6675
Charity apprentice logo-blue-6675Charity apprentice logo-blue-6675
Charity apprentice logo-blue-6675FITC
Β 
Chromium ui framework(shared)
Chromium ui framework(shared)Chromium ui framework(shared)
Chromium ui framework(shared)gnomekr
Β 

Viewers also liked (8)

了解 Qt
了解 Qt了解 Qt
了解 Qt
Β 
Accelerating performance on Qt and WebKit for the MIPS architecture
Accelerating performance on Qt and WebKit for the MIPS architectureAccelerating performance on Qt and WebKit for the MIPS architecture
Accelerating performance on Qt and WebKit for the MIPS architecture
Β 
Designing and Building (Your Own) UI Frameworks For the Enterprise
Designing and Building (Your Own) UI Frameworks For the EnterpriseDesigning and Building (Your Own) UI Frameworks For the Enterprise
Designing and Building (Your Own) UI Frameworks For the Enterprise
Β 
Maemo 6 UI Framework
Maemo 6 UI FrameworkMaemo 6 UI Framework
Maemo 6 UI Framework
Β 
OVERVIEW: Chromium Source Tree
OVERVIEW: Chromium Source TreeOVERVIEW: Chromium Source Tree
OVERVIEW: Chromium Source Tree
Β 
Charity apprentice logo-blue-6675
Charity apprentice logo-blue-6675Charity apprentice logo-blue-6675
Charity apprentice logo-blue-6675
Β 
Qt5 embedded
Qt5 embeddedQt5 embedded
Qt5 embedded
Β 
Chromium ui framework(shared)
Chromium ui framework(shared)Chromium ui framework(shared)
Chromium ui framework(shared)
Β 

Similar to 03 - Qt UI Development

Qt & Webkit
Qt & WebkitQt & Webkit
Qt & WebkitQT-day
Β 
Meet the Widgets: Another Way to Implement UI
Meet the Widgets: Another Way to Implement UIMeet the Widgets: Another Way to Implement UI
Meet the Widgets: Another Way to Implement UIICS
Β 
Quick Start to iOS Development
Quick Start to iOS DevelopmentQuick Start to iOS Development
Quick Start to iOS DevelopmentJussi Pohjolainen
Β 
Qt for beginners part 2 widgets
Qt for beginners part 2   widgetsQt for beginners part 2   widgets
Qt for beginners part 2 widgetsICS
Β 
GWT MVP Case Study
GWT MVP Case StudyGWT MVP Case Study
GWT MVP Case StudyDavid Chandler
Β 
Hybrid Apps (Native + Web) using WebKit
Hybrid Apps (Native + Web) using WebKitHybrid Apps (Native + Web) using WebKit
Hybrid Apps (Native + Web) using WebKitAriya Hidayat
Β 
Hybrid Apps (Native + Web) using WebKit
Hybrid Apps (Native + Web) using WebKitHybrid Apps (Native + Web) using WebKit
Hybrid Apps (Native + Web) using WebKitAriya Hidayat
Β 
Petri Niemi Qt Web Kit
Petri Niemi Qt Web KitPetri Niemi Qt Web Kit
Petri Niemi Qt Web KitNokiaAppForum
Β 
Porting Motif Applications to Qt - Webinar
Porting Motif Applications to Qt - WebinarPorting Motif Applications to Qt - Webinar
Porting Motif Applications to Qt - WebinarICS
Β 
Porting Motif Applications to Qt - Webinar
Porting Motif Applications to Qt - WebinarPorting Motif Applications to Qt - Webinar
Porting Motif Applications to Qt - WebinarJanel Heilbrunn
Β 
Petri Niemi Qt Advanced Part 1
Petri Niemi Qt Advanced Part 1Petri Niemi Qt Advanced Part 1
Petri Niemi Qt Advanced Part 1NokiaAppForum
Β 
Java Web Programming on Google Cloud Platform [3/3] : Google Web Toolkit
Java Web Programming on Google Cloud Platform [3/3] : Google Web ToolkitJava Web Programming on Google Cloud Platform [3/3] : Google Web Toolkit
Java Web Programming on Google Cloud Platform [3/3] : Google Web ToolkitIMC Institute
Β 
The Ring programming language version 1.2 book - Part 51 of 84
The Ring programming language version 1.2 book - Part 51 of 84The Ring programming language version 1.2 book - Part 51 of 84
The Ring programming language version 1.2 book - Part 51 of 84Mahmoud Samir Fayed
Β 
Google Web Toolkits
Google Web ToolkitsGoogle Web Toolkits
Google Web ToolkitsYiguang Hu
Β 
The Ring programming language version 1.6 book - Part 73 of 189
The Ring programming language version 1.6 book - Part 73 of 189The Ring programming language version 1.6 book - Part 73 of 189
The Ring programming language version 1.6 book - Part 73 of 189Mahmoud Samir Fayed
Β 
Hybrid Apps (Native + Web) via QtWebKit
Hybrid Apps (Native + Web) via QtWebKitHybrid Apps (Native + Web) via QtWebKit
Hybrid Apps (Native + Web) via QtWebKitAriya Hidayat
Β 

Similar to 03 - Qt UI Development (20)

Qt & Webkit
Qt & WebkitQt & Webkit
Qt & Webkit
Β 
Meet the Widgets: Another Way to Implement UI
Meet the Widgets: Another Way to Implement UIMeet the Widgets: Another Way to Implement UI
Meet the Widgets: Another Way to Implement UI
Β 
Quick Start to iOS Development
Quick Start to iOS DevelopmentQuick Start to iOS Development
Quick Start to iOS Development
Β 
Qt for beginners part 2 widgets
Qt for beginners part 2   widgetsQt for beginners part 2   widgets
Qt for beginners part 2 widgets
Β 
Qt
QtQt
Qt
Β 
GWT MVP Case Study
GWT MVP Case StudyGWT MVP Case Study
GWT MVP Case Study
Β 
Hybrid Apps (Native + Web) using WebKit
Hybrid Apps (Native + Web) using WebKitHybrid Apps (Native + Web) using WebKit
Hybrid Apps (Native + Web) using WebKit
Β 
Hybrid Apps (Native + Web) using WebKit
Hybrid Apps (Native + Web) using WebKitHybrid Apps (Native + Web) using WebKit
Hybrid Apps (Native + Web) using WebKit
Β 
Treinamento Qt bΓ‘sico - aula III
Treinamento Qt bΓ‘sico - aula IIITreinamento Qt bΓ‘sico - aula III
Treinamento Qt bΓ‘sico - aula III
Β 
Petri Niemi Qt Web Kit
Petri Niemi Qt Web KitPetri Niemi Qt Web Kit
Petri Niemi Qt Web Kit
Β 
Porting Motif Applications to Qt - Webinar
Porting Motif Applications to Qt - WebinarPorting Motif Applications to Qt - Webinar
Porting Motif Applications to Qt - Webinar
Β 
Porting Motif Applications to Qt - Webinar
Porting Motif Applications to Qt - WebinarPorting Motif Applications to Qt - Webinar
Porting Motif Applications to Qt - Webinar
Β 
Qt programming-using-cpp
Qt programming-using-cppQt programming-using-cpp
Qt programming-using-cpp
Β 
Petri Niemi Qt Advanced Part 1
Petri Niemi Qt Advanced Part 1Petri Niemi Qt Advanced Part 1
Petri Niemi Qt Advanced Part 1
Β 
Qt Application Programming with C++ - Part 1
Qt Application Programming with C++ - Part 1Qt Application Programming with C++ - Part 1
Qt Application Programming with C++ - Part 1
Β 
Java Web Programming on Google Cloud Platform [3/3] : Google Web Toolkit
Java Web Programming on Google Cloud Platform [3/3] : Google Web ToolkitJava Web Programming on Google Cloud Platform [3/3] : Google Web Toolkit
Java Web Programming on Google Cloud Platform [3/3] : Google Web Toolkit
Β 
The Ring programming language version 1.2 book - Part 51 of 84
The Ring programming language version 1.2 book - Part 51 of 84The Ring programming language version 1.2 book - Part 51 of 84
The Ring programming language version 1.2 book - Part 51 of 84
Β 
Google Web Toolkits
Google Web ToolkitsGoogle Web Toolkits
Google Web Toolkits
Β 
The Ring programming language version 1.6 book - Part 73 of 189
The Ring programming language version 1.6 book - Part 73 of 189The Ring programming language version 1.6 book - Part 73 of 189
The Ring programming language version 1.6 book - Part 73 of 189
Β 
Hybrid Apps (Native + Web) via QtWebKit
Hybrid Apps (Native + Web) via QtWebKitHybrid Apps (Native + Web) via QtWebKit
Hybrid Apps (Native + Web) via QtWebKit
Β 

More from Andreas Jakl

Create Engaging Healthcare Experiences with Augmented Reality
Create Engaging Healthcare Experiences with Augmented RealityCreate Engaging Healthcare Experiences with Augmented Reality
Create Engaging Healthcare Experiences with Augmented RealityAndreas Jakl
Β 
AR / VR Interaction Development with Unity
AR / VR Interaction Development with UnityAR / VR Interaction Development with Unity
AR / VR Interaction Development with UnityAndreas Jakl
Β 
Android Development with Kotlin, Part 3 - Code and App Management
Android Development with Kotlin, Part 3 - Code and App ManagementAndroid Development with Kotlin, Part 3 - Code and App Management
Android Development with Kotlin, Part 3 - Code and App ManagementAndreas Jakl
Β 
Android Development with Kotlin, Part 2 - Internet Services and JSON
Android Development with Kotlin, Part 2 - Internet Services and JSONAndroid Development with Kotlin, Part 2 - Internet Services and JSON
Android Development with Kotlin, Part 2 - Internet Services and JSONAndreas Jakl
Β 
Android Development with Kotlin, Part 1 - Introduction
Android Development with Kotlin, Part 1 - IntroductionAndroid Development with Kotlin, Part 1 - Introduction
Android Development with Kotlin, Part 1 - IntroductionAndreas Jakl
Β 
Android and NFC / NDEF (with Kotlin)
Android and NFC / NDEF (with Kotlin)Android and NFC / NDEF (with Kotlin)
Android and NFC / NDEF (with Kotlin)Andreas Jakl
Β 
Basics of Web Technologies
Basics of Web TechnologiesBasics of Web Technologies
Basics of Web TechnologiesAndreas Jakl
Β 
Bluetooth Beacons - Bluetooth 5, iBeacon, Eddystone, Arduino, Windows 10 & More
Bluetooth Beacons - Bluetooth 5, iBeacon, Eddystone, Arduino, Windows 10 & MoreBluetooth Beacons - Bluetooth 5, iBeacon, Eddystone, Arduino, Windows 10 & More
Bluetooth Beacons - Bluetooth 5, iBeacon, Eddystone, Arduino, Windows 10 & MoreAndreas Jakl
Β 
Which new scenarios are enabled by Windows 10 for NFC, Bluetooth LE & Beacons?
Which new scenarios are enabled by Windows 10 for NFC, Bluetooth LE & Beacons?Which new scenarios are enabled by Windows 10 for NFC, Bluetooth LE & Beacons?
Which new scenarios are enabled by Windows 10 for NFC, Bluetooth LE & Beacons?Andreas Jakl
Β 
Mobile Test Automation
Mobile Test AutomationMobile Test Automation
Mobile Test AutomationAndreas Jakl
Β 
Qt App Development - Cross-Platform Development for Android, iOS, Windows Pho...
Qt App Development - Cross-Platform Development for Android, iOS, Windows Pho...Qt App Development - Cross-Platform Development for Android, iOS, Windows Pho...
Qt App Development - Cross-Platform Development for Android, iOS, Windows Pho...Andreas Jakl
Β 
WinJS, Apache Cordova & NFC - HTML5 apps for Android and Windows Phone
WinJS, Apache Cordova & NFC - HTML5 apps for Android and Windows PhoneWinJS, Apache Cordova & NFC - HTML5 apps for Android and Windows Phone
WinJS, Apache Cordova & NFC - HTML5 apps for Android and Windows PhoneAndreas Jakl
Β 
Nokia New Asha Platform Developer Training
Nokia New Asha Platform Developer TrainingNokia New Asha Platform Developer Training
Nokia New Asha Platform Developer TrainingAndreas Jakl
Β 
Windows Phone 8 NFC Quickstart
Windows Phone 8 NFC QuickstartWindows Phone 8 NFC Quickstart
Windows Phone 8 NFC QuickstartAndreas Jakl
Β 
Windows (Phone) 8 NFC App Scenarios
Windows (Phone) 8 NFC App ScenariosWindows (Phone) 8 NFC App Scenarios
Windows (Phone) 8 NFC App ScenariosAndreas Jakl
Β 
Windows 8 Platform NFC Development
Windows 8 Platform NFC DevelopmentWindows 8 Platform NFC Development
Windows 8 Platform NFC DevelopmentAndreas Jakl
Β 
NFC Development with Qt - v2.2.0 (5. November 2012)
NFC Development with Qt - v2.2.0 (5. November 2012)NFC Development with Qt - v2.2.0 (5. November 2012)
NFC Development with Qt - v2.2.0 (5. November 2012)Andreas Jakl
Β 
06 - Qt Communication
06 - Qt Communication06 - Qt Communication
06 - Qt CommunicationAndreas Jakl
Β 
05 - Qt External Interaction and Graphics
05 - Qt External Interaction and Graphics05 - Qt External Interaction and Graphics
05 - Qt External Interaction and GraphicsAndreas Jakl
Β 
04 - Qt Data
04 - Qt Data04 - Qt Data
04 - Qt DataAndreas Jakl
Β 

More from Andreas Jakl (20)

Create Engaging Healthcare Experiences with Augmented Reality
Create Engaging Healthcare Experiences with Augmented RealityCreate Engaging Healthcare Experiences with Augmented Reality
Create Engaging Healthcare Experiences with Augmented Reality
Β 
AR / VR Interaction Development with Unity
AR / VR Interaction Development with UnityAR / VR Interaction Development with Unity
AR / VR Interaction Development with Unity
Β 
Android Development with Kotlin, Part 3 - Code and App Management
Android Development with Kotlin, Part 3 - Code and App ManagementAndroid Development with Kotlin, Part 3 - Code and App Management
Android Development with Kotlin, Part 3 - Code and App Management
Β 
Android Development with Kotlin, Part 2 - Internet Services and JSON
Android Development with Kotlin, Part 2 - Internet Services and JSONAndroid Development with Kotlin, Part 2 - Internet Services and JSON
Android Development with Kotlin, Part 2 - Internet Services and JSON
Β 
Android Development with Kotlin, Part 1 - Introduction
Android Development with Kotlin, Part 1 - IntroductionAndroid Development with Kotlin, Part 1 - Introduction
Android Development with Kotlin, Part 1 - Introduction
Β 
Android and NFC / NDEF (with Kotlin)
Android and NFC / NDEF (with Kotlin)Android and NFC / NDEF (with Kotlin)
Android and NFC / NDEF (with Kotlin)
Β 
Basics of Web Technologies
Basics of Web TechnologiesBasics of Web Technologies
Basics of Web Technologies
Β 
Bluetooth Beacons - Bluetooth 5, iBeacon, Eddystone, Arduino, Windows 10 & More
Bluetooth Beacons - Bluetooth 5, iBeacon, Eddystone, Arduino, Windows 10 & MoreBluetooth Beacons - Bluetooth 5, iBeacon, Eddystone, Arduino, Windows 10 & More
Bluetooth Beacons - Bluetooth 5, iBeacon, Eddystone, Arduino, Windows 10 & More
Β 
Which new scenarios are enabled by Windows 10 for NFC, Bluetooth LE & Beacons?
Which new scenarios are enabled by Windows 10 for NFC, Bluetooth LE & Beacons?Which new scenarios are enabled by Windows 10 for NFC, Bluetooth LE & Beacons?
Which new scenarios are enabled by Windows 10 for NFC, Bluetooth LE & Beacons?
Β 
Mobile Test Automation
Mobile Test AutomationMobile Test Automation
Mobile Test Automation
Β 
Qt App Development - Cross-Platform Development for Android, iOS, Windows Pho...
Qt App Development - Cross-Platform Development for Android, iOS, Windows Pho...Qt App Development - Cross-Platform Development for Android, iOS, Windows Pho...
Qt App Development - Cross-Platform Development for Android, iOS, Windows Pho...
Β 
WinJS, Apache Cordova & NFC - HTML5 apps for Android and Windows Phone
WinJS, Apache Cordova & NFC - HTML5 apps for Android and Windows PhoneWinJS, Apache Cordova & NFC - HTML5 apps for Android and Windows Phone
WinJS, Apache Cordova & NFC - HTML5 apps for Android and Windows Phone
Β 
Nokia New Asha Platform Developer Training
Nokia New Asha Platform Developer TrainingNokia New Asha Platform Developer Training
Nokia New Asha Platform Developer Training
Β 
Windows Phone 8 NFC Quickstart
Windows Phone 8 NFC QuickstartWindows Phone 8 NFC Quickstart
Windows Phone 8 NFC Quickstart
Β 
Windows (Phone) 8 NFC App Scenarios
Windows (Phone) 8 NFC App ScenariosWindows (Phone) 8 NFC App Scenarios
Windows (Phone) 8 NFC App Scenarios
Β 
Windows 8 Platform NFC Development
Windows 8 Platform NFC DevelopmentWindows 8 Platform NFC Development
Windows 8 Platform NFC Development
Β 
NFC Development with Qt - v2.2.0 (5. November 2012)
NFC Development with Qt - v2.2.0 (5. November 2012)NFC Development with Qt - v2.2.0 (5. November 2012)
NFC Development with Qt - v2.2.0 (5. November 2012)
Β 
06 - Qt Communication
06 - Qt Communication06 - Qt Communication
06 - Qt Communication
Β 
05 - Qt External Interaction and Graphics
05 - Qt External Interaction and Graphics05 - Qt External Interaction and Graphics
05 - Qt External Interaction and Graphics
Β 
04 - Qt Data
04 - Qt Data04 - Qt Data
04 - Qt Data
Β 

Recently uploaded

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
Β 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
Β 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
Β 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
Β 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
Β 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
Β 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
Β 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
Β 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
Β 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
Β 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
Β 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
Β 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel AraΓΊjo
Β 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
Β 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
Β 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
Β 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
Β 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
Β 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
Β 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
Β 

Recently uploaded (20)

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
Β 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
Β 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
Β 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
Β 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
Β 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
Β 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
Β 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
Β 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
Β 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
Β 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
Β 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
Β 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Β 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Β 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Β 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Β 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
Β 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
Β 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Β 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
Β 

03 - Qt UI Development

  • 1. Qt UI Development Andreas Jakl Senior Technical Consultant Forum Nokia 23 October, 2010 v3.2.0
  • 2. Contents – Ways of creating user interfaces with Qt – Subclassing Widgets (Signals & Slots, continued) – Dialogs – Main Window – Menus, Toolbars and Actions
  • 4. Qt & Graphics β€’ Available options – Traditional widgets – Custom widgets and QPainter – QGraphicsView – QGLWidget – Qt Quick – QtWebKit
  • 5. Traditional Qt Widgets β€’ QWidget as base of UI components in Qt – Window management, layouts – Use native UI design – Support style sheets – Ex.: QPushButton, QLabel, QLineEdit
  • 6. Traditional Qt Widgets β€’ UI Designer support – Instant preview, drag & drop UI – Integrated even with translator tool High level Exactly the same code on all platforms Less customization possible, UI effects difficult Smaller UI, different paradigms
  • 7. QWidget and QPainter β€’ Draw manually using QPainter – On QWidget surfaces – Flexible painting: text, gradients, polygons, bezier curves, transparencies, etc. Lets you express your painting directly Traditional Makes you express your painting directly
  • 8. QGraphicsView β€’ Manage 2D scenes with a scene graph – Can manage thousands of items with hierarchies – Collision detection, affine transformations, drag and drop support – Hardware acceleration and integration with QWidget possible High level Conceptually nice and flexible No ready-made common UI components available yet
  • 9. MeeGo Touch β€’ UI Framework based on QGraphicsView – Provides common UI components with theme support – Integrates transitions and effects Great graphics effects, theme support Easy to create smooth UIs Already available from source repositories Still in development
  • 10. QGLWidget β€’ Very low level – Basic setup by Qt – You do the hard work Angry Birds and Bounce by Rovio Complete control over GL Good if you have existing codebase & assets, cross-platform OpenGL is hard work (but there’s more Qt coming for that *) No Qt OpenGL for Symbian integration in Qt 4.7.0 * http://doc.qt.nokia.com/qt3d-snapshot/index.html
  • 11. Qt Quick β€’ Several components – QML language and JavaScript – Declarative syntax, animations and states integrated – Available in Qt 4.7+ Very easy to make slick, fluid UIs Will soon be most important way to create mobile UIs More tooling is on its way Ready-made UI components on their way * * Project page: http://bugreports.qt.nokia.com/browse/QTCOMPONENTS
  • 12. Sample app to integrate web into Qt: http://wiki.forum.nokia.com/index.php/QtWebKitStub QtWebKit β€’ Open source browser engine – Display HTML(5) and JavaScript content through a QWidget – Combine Qt C++ and web code if needed to get best of both worlds Use your existing web skills to create the UI Reuse web components (online help, etc.) Complex UIs and interaction probably more difficult Less performance than native code (but improving)
  • 13. How to Choose? β€’ Depends on – Complexity of your UI – Existing code/assets – Experience with low level code – Which devices you’re targeting – Your timeframe β€’ Mix and match as appropriate!
  • 15. Signal and Slots, Continued β€’ How to accomplish the following? QObject::connect(button, SIGNAL(clicked()), label, SLOT(setText("new text")));  doesn’t work that way, clicked()-signal doesn’t give required number of arguments to setText()-slot.
  • 16. Custom Widgets (Slots) β€’ Commonly used: subclass widgets to extend functionality – Class MyWindow is a widget (parent) – Also manages child widgets β€’ Widget adds new slot – Put text to display into this slot method instead of the connect statement
  • 17. myWindow.h myWindow.cpp #include <QtGui/QApplication> #include "MyWindow.h" #ifndef MYWINDOW_H #include "MyWindow.h" int main(int argc, char *argv[]) #define MYWINDOW_H { MyWindow::MyWindow(QWidget* parent) QApplication a(argc, argv); #include <QWidget> : MyWindow* window = new MyWindow(); window->show(); #include <QVBoxLayout> QWidget(parent) return a.exec(); #include <QPushButton> { } #include <QLabel> label = new QLabel("old text"); #include <QObject> button0 = new QPushButton("Update labels"); main.cpp button1 = new QPushButton("Exit"); class MyWindow : public QWidget { layout = new QVBoxLayout(this); Q_OBJECT layout->addWidget(button0); public: layout->addWidget(button1); MyWindow(QWidget *parent = 0); layout->addWidget(label); setLayout(layout); private: QLabel* label; connect(button0, SIGNAL(clicked()), QPushButton* button0; this, SLOT(setText())); QPushButton* button1; connect(button1, SIGNAL(clicked()), QVBoxLayout* layout; this, SLOT(close())); } private slots: void setText(); void MyWindow::setText() }; { label->setText("new text"); #endif // MYWINDOW_H }
  • 19. Dialogs QObject QPaintDevice β€’ Dialog is: QWidget – Top-level window – Used for short-term tasks, brief user communication – Can provide return value QDialog β€’ Modal – Dialog blocks other application windows (e.g., file open dialog) – Usually called with exec(), returns when dialog is closed – Call with show(): returns immediately, get results via signals β€’ Modeless – Operates independently from other windows (e.g., find & replace dialog) – Always called with show(): returns immediately
  • 20. Custom Dialog clicked() signal from button in main widget triggers dialog Change label in main widget depending on user action selected in dialog
  • 21. Signals & Slots Diagram Signals Signals clicked() clicked() Slots Slots Slots Signals exec(int) accept() accepted() reject() rejected() Signals Signals clicked() Slots Slots checkInputDialog()
  • 22. The Dialog myDialog.h myDialog.cpp #ifndef MYDIALOG_H #include "mydialog.h" #define MYDIALOG_H MyDialog::MyDialog() #include <QDialog> { #include <QPushButton> setFixedSize(150, 100); #include <QVBoxLayout> QVBoxLayout* vbox = new QVBoxLayout(); #include <QLabel> QLabel* label = new QLabel("Please confirm."); QPushButton* okButton = new QPushButton("Ok"); class MyDialog : public QDialog QPushButton* cancelButton = new QPushButton("Cancel"); { Q_OBJECT // Set the ok button as default public: okButton->setDefault(true); MyDialog(); vbox->addWidget(label); }; vbox->addWidget(okButton); vbox->addWidget(cancelButton); #endif // MYDIALOG_H setLayout(vbox); // Connect the buttons to slots defined by QDialog connect(okButton, SIGNAL(clicked()), this, SLOT(accept())); connect(cancelButton, SIGNAL(clicked()), this, SLOT(reject())); }
  • 23. QDialog Base Class Slot Description virtual void accept() Hides the dialog and sets the result code to Accepted (1). virtual void reject() Hides the dialog and sets the result code to Rejected (0). virtual void done(int r) Closes the dialog and sets return value to r. If the dialog is started via exec(), done() causes the event loop to finish, and exec() to return r. Deletes the dialog if Qt::WA_DeleteOnClose is set. int exec() Shows the dialog as a modal dialog, blocking until the user closes it. Returns dialog return value (DialogCode) like Accepted or Rejected. Signal Description void accepted() Emitted when dialog has been accepted through calling accept() or done() with the argument QDialog::Accepted void rejected() Emitted when dialog has been rejected through calling reject() or done() with the argument QDialog::Rejected void finished(int result) Emitted when the dialog’s result code has been set (setResult()) and either accept(), reject() or done() is called.
  • 24. The Widget mywidget.h mywidget.cpp [...] #include "mywidget.h" class MyWidget : public QWidget MyWidget::MyWidget(QWidget *parent) : QWidget(parent) { { setWindowTitle("Main Window - Dialog Example"); Q_OBJECT startButton = new QPushButton("Start dialog"); instructionsLabel = new QLabel("Please push the button"); public: resultLabel = new QLabel(); MyWidget(QWidget *parent = 0); ~MyWidget(); layout = new QVBoxLayout(this); layout->addWidget(instructionsLabel); private slots: layout->addWidget(startButton); void checkInputDialog(); layout->addWidget(resultLabel); private: dialog = new MyDialog(); QPushButton* startButton; QLabel* instructionsLabel; connect(startButton, SIGNAL(clicked()), QLabel* resultLabel; dialog, SLOT(exec())); QVBoxLayout* layout; connect(dialog, SIGNAL(accepted()), MyDialog* dialog; this, SLOT(checkInputDialog())); connect(dialog, SIGNAL(rejected()), }; this, SLOT(checkInputDialog())); } #endif // MYWIDGET_H void MyWidget::checkInputDialog() { int res = dialog->result(); // Gets result (Accepted/Rejected) if (res == QDialog::Accepted) { resultLabel->setText(""Ok" was selected"); } else if (res == QDialog::Rejected) { resultLabel->setText(""Cancel" was selected"); } }
  • 25. Custom Return Values mydialog.h [...] private slots: void setResult(); [...] mydialog.cpp [...] connect(ignoreButton, SIGNAL(clicked()), this, SLOT(setResult())); [...] void MyDialog::setResult() mywidget.cpp { [...] int result = 99; connect(dialog, SIGNAL(finished(int)), emit done(result); this, SLOT(checkInputDialog(int))); } [...] void MyWidget::checkInputDialog(int res) mywidget.h { [...] if (res == 99) private slots: { void checkInputDialog(); resultLabel->setText(""Ignore" was selected"); void checkInputDialog(int); } [...] }
  • 26. Predefined Dialogs QColorDialog QInputDialog QMessageBox QFontDialog QFileDialog QErrorMessage
  • 27. Predefined Dialogs β€’ Example: Message box – Modal dialog – User selection β†’ return value int ret = QMessageBox::warning( this, "Exit?", "Do you really want to exit the application?", QMessageBox::Yes | QMessageBox::No );
  • 29. Main Window β€’ Provides main application window Menu Bar – Pre-defined layout for standard components Toolbars – Central widget must be defined, others Dock Widgets optional – Subclass to create your own implementation Central Widget β€’ Differences? – Possible with dialog / widgets as well – But: more comfortable, consistent and efficient Status Bar
  • 30. Example - QMainWindow mainwindow.h mainwindow.cpp [...] #include "mainwindow.h" class MainWindow : public QMainWindow MainWindow::MainWindow(QWidget *parent, Qt::WFlags flags) { : QMainWindow(parent, flags) Q_OBJECT { editor = new QTextEdit(); public: setMinimumSize(160, 160); MainWindow(QWidget *parent = 0, resize(480, 320); Qt::WFlags flags = 0); setCentralWidget(editor); ~MainWindow(); setWindowTitle("QMainWindow with Menus"); private: QString message = "Welcome"; QTextEdit* editor; statusBar()->showMessage(message); } [...] }; #endif // MAINWINDOW_H main.cpp is similar to the previous example
  • 31. Action Image by Anna Cervova (Public Domain) β€’ Represent abstract user interface β€’ Stores action information about – Define once, use in multiple – Icons components – Text – Inserted into widgets – Keyboard shortcut β€’ Menus (can create actions implicitly) – Status text β€’ Toolbar buttons – β€œWhat’s This?” text β€’ Keyboard shortcuts – Tooltip
  • 32. Menu Bar β€’ QMenu provides: – a menu widget for menu bars, context menus and other popup menus β€’ Supports: – Triggered Items – Separators – Submenus – Tear-off menus β€’ QMenuBar automatically created by QMainWindow β€’ QMenu(s) contains individual menu items ( Actions)
  • 33. Example – QAction mainwindow.h mainwindow.cpp [...] [...] // Create a new β€œOpen” action with an icon, keyboard shortcut and class MainWindow // info-text for the status bar. : public QMainWindow openAct = new QAction("&Open...", this); { openAct->setIcon(QIcon("images/open.png")); Q_OBJECT openAct->setShortcut(tr("Ctrl+O")); [...] openAct->setStatusTip(tr("Open an existing file")); connect(openAct, SIGNAL(triggered()), this, SLOT(openFile())); private slots: void openFile(); // Add the action to the menu fileMenu = menuBar()->addMenu(tr("&File")); private: fileMenu->addAction(openAct); QMenu *fileMenu; QAction *openAct; [...] }; void MainWindow::openFile() { // Define two filter options – one for documents, one for all files // The filter mask is automatically parsed, β€œ;;” separates lines QString file = QFileDialog::getOpenFileName(this, "Please choose a file to open", QDir::homePath(), "Documents (*.pdf *.doc *.docx);;All files (*.*)"); if (!file.isNull()) { QString info("You chose this filen"); info.append(file); QMessageBox::information(this, "Your Choice", info, QMessageBox::Ok); } }
  • 34. Toolbar β€’ Same actions as for menu can be used for toolbar β€’ Default automatically enables drag & drop
  • 35. Example – QToolBar mainwindow.h mainwindow.cpp [...] #include "mainwindow.h" class MainWindow MainWindow::MainWindow(QWidget *parent, Qt::WFlags flags) : public QMainWindow : QMainWindow(parent, flags) { { [...] Q_OBJECT // Open action [...] openAct = new QAction("&Open...", this); openAct->setIcon(QIcon("images/open.png")); private: openAct->setShortcut(tr("Ctrl+O")); QToolBar *toolFile; openAct->setStatusTip(tr("Open an existing file")); }; connect(openAct, SIGNAL(triggered()), this, SLOT(openFile())); // Exit action exitAct = new QAction("E&xit", this); exitAct->setIcon(QIcon("images/exit.png")); exitAct->setShortcut(tr("Ctrl+Q")); exitAct->setStatusTip(tr("Exit the application")); connect(exitAct, SIGNAL(triggered()), this, SLOT(close())); // Create the file menu fileMenu = menuBar()->addMenu(tr("&File")); fileMenu->addAction(openAct); fileMenu->addSeparator(); fileMenu->addAction(exitAct); // Add the actions to the toolbar toolFile = addToolBar("File"); toolFile->addAction(openAct); toolFile->addAction(exitAct); [...] }