Beruflich Dokumente
Kultur Dokumente
Create more
Codeless
Deploy everywhere
Agenda
What is QT? QT architecture Install QT New terms Object model Common used type First Example Project file Signals and Slots Model/View programming QMainWindow Build Application GUI Designer tool Linguist tool Deploy application Reference links Questions and Answers
Introduction
Agenda
What is QT? QT architecture Install QT New terms Object model Common used type First Example Project file Signals and Slots Model/View programming QMainWindow Build Application GUI Designer tool Linguist tool Deploy application Reference links Questions and Answers
Introduction
What is QT?
Qt is the de facto standard C++ framework for high performance cross-platform software development.
Introduction
What is QT?
The Qt C++ framework has been at the heart of commercial applications since 1995. Qt is used by Adobe, Boeing, Google, IBM, Motorola,NASA, Skype, and by numerous smaller companies and organizations.
Introduction
What is QT?
Introduction
Google Earth
Agenda
What is QT? QT architecture New terms Object model Common used type First Example Project file Signals and Slots Model/View programming QMainWindow Build Application GUI Designer tool Linguist tool Deploy application Reference links Questions and Answers
Introduction
Product Architecture
GUI Introduction
Build project
Qt's Architecture
Introduction
Qts functionality is built on the low-level APIs of the platforms it supports. This makes Qt flexible and efficient, and enables Qt applications to fit in with single-platform applications.
Introduction
Qt Jambi exposes the Qt API to Java applications, allowing highly portable applications to be written that take full advantage of C++ code for performance while looking and feeling native on each platform.
Introduction
Agenda
What is QT? QT architecture Install QT New terms Object model Common used type First Example Project file Signals and Slots Model/View programming QMainWindow Build Application GUI Designer tool Linguist tool Deploy application Reference links Questions and Answers
Introduction
Install QT
What available on the Market? View qt-win-commercial-4.4.1-vs2008.exe the QT frame work qt-vsintegration-1.4.1.exe the plug-in tool for Visual Studio
Introduction
Agenda
What is QT? QT architecture Install QT New terms Object model Common used type First Example Project file Signals and Slots Model/View programming QMainWindow Build Application GUI Designer tool Linguist tool Deploy application Reference links Questions and Answers
Introduction
Signal/Slot
Signal is Signal which raised in the object when an event occurs Slot is Slot is a functionComing Soon called in order to response an signal Signals and slots are used for communication between objects An alternative to the callback technique
Agenda
What is QT? QT architecture Install QT New terms Object model Common used type First Example Project file Signals and Slots Model/View programming QMainWindow Build Application GUI Designer tool Linguist tool Deploy application Reference links Questions and Answers
Introduction
Object Model
These classes form the basis of the Qt Object Model. QMetaClassInfo QMetaEnum Additional information about a class Meta-data about an enumerator
Introduction
QMetaMethod
QMetaObject QMetaProperty
QMetaType
QObject QObjectCleanupHandler QPointer QVariant
Introduction
QObject
Introduction
QFileDialog
QAbstractPrintDialog
QFrame
QAbstractButton
QTabWidget
...
QAbstractScrollArea
QPushButton
QAbstractItemView
QListView
QTableView
QTreeView
QListWidget
QTableWidget
QTreeWidget
The QWidget class is the base class of all user interface objects.
Agenda
What is QT? QT architecture Install QT New terms Object model Common used type First Example Project file Signals and Slots Model/View programming QMainWindow Build Application GUI Designer tool Linguist tool Deploy application Reference links Questions and Answers
Introduction
Agenda
What is QT? QT architecture Install QT New terms Object model Common used type First Example Project file Signals and Slots Model/View programming QMainWindow Build Application GUI Designer tool Linguist tool Deploy application Reference links Questions and Answers
Introduction
Introduction
Agenda
What is QT? QT architecture Install QT New terms Object model Common used type First Example Project file Signals and Slots Model/View programming QMainWindow Build Application GUI Designer tool Linguist tool Deploy application Reference links Questions and Answers
Introduction
Introduction
Agenda
What is QT? QT architecture Install QT New terms Object model Common used type First Example Project file Signals and Slots Model/View programming QMainWindow Build Application GUI Designer tool Linguist tool Deploy application Reference links Questions and Answers
Introduction
Introduction
Introduction
Introduction
Introduction
Introduction
Execution of the code following the emit statement will occur once all slots have returned
Signals . Slots.
Introduction
Agenda
What is QT? QT architecture Install QT New terms Object model Common used type First Example Project file Signals and Slots Model/View programming QMainWindow Build Application GUI Designer tool Linguist tool Deploy application Reference links Questions and Answers
Introduction
Introduction
Model-View-Controller (MVC) is a design pattern originating from Smalltalk that is often used when building user interfaces MVC consists of three kinds of objects. The Model is the application object, the View is its screen presentation, and the Controller defines the way the user interface reacts to user input If the view and the controller objects are combined, the result is the model/view architecture
Model\View
The model communicates with a source of data, providing an interface for the other components in the architecture The view obtains model indexes from the model, the view can retrieve items of data from the data source In standard views, a delegate renders / allow to edit the items of data
Introduction
Model\View
Signals from the model inform the view about changes to the data held by the data source. Signals from the view provide information about the user's interaction with the items being displayed. Signals from the delegate are used during editing to tell the model and view about the state of the editor.
Introduction
Introduction
Model\View
Use this technique with QTableView, QTreeView, QListView Or You can use QTableWidget, QTreeWidget, QListWidget and dont need to know Model\View architecture
Introduction
Agenda
What is QT? QT architecture Install QT New terms Object model Common used type First Example Project file Signals and Slots Model/View programming QMainWindow Build Application GUI Designer tool Linguist tool Deploy application Reference links Questions and Answers
Introduction
QMainWindow
Inherit from QWidget.
Introduction
The layout has a center area that can be occupied by any kind of widget
QMainWindow - Layout
Introduction
Introduction
Agenda
What is QT? QT architecture Install QT New terms Object model Common used type First Example Project file Signals and Slots Model/View programming QMainWindow Build Application GUI Designer tool Linguist tool Deploy application Reference links Questions and Answers
Introduction
Introduction
Run make or nmake to build the project I like to use tool Visual studio with the QT integration tool
Agenda
What is QT? QT architecture Install QT New terms Object model Common used type First Example Project file Signals and Slots Model/View programming QMainWindow Build Application GUI Designer tool Linguist tool Deploy application Reference links Questions and Answers
Introduction
Designer tool
What you drag is what you get ?
Introduction
Agenda
What is QT? QT architecture Install QT New terms Object model Common used type First Example Project file Signals and Slots Model/View programming QMainWindow Build Application GUI Designer tool Linguist tool Deploy application Reference links Questions and Answers
Introduction
Linguist Tool
Make all tribes understand your application!
Introduction
Linguist Tool
#include <QApplication> #include <QPushButton> #include <QTranslator> int main(int argc, char *argv[]) { QApplication app(argc, argv); QTranslator translator; translator.load("hellotr_la"); app.installTranslator(&translator); QPushButton hello(QPushButton::tr("Hello world!")); hello.resize(100, 30); hello.show(); return app.exec(); }
-Use tr() for the subclass of QObject -Use QObject::tr() static function -Or Use qApp->translate()
Introduction
Linguist Tool
Make file hellotr.pro:
SOURCES = main.cpp TRANSLATIONS = hellotr_la.ts
Introduction See in assistant Internationalization with Qt
Edit with Linguist tool Generate a .qm file from the .ts file
Choose File|Release from Qt Linguist's menu bar and Save
Assistant
Introduction
Agenda
What is QT? QT architecture Install QT New terms Object model Common used type First Example Project file Signals and Slots Model/View programming QMainWindow Build Application GUI Designer tool Linguist tool Deploy application Reference links Questions and Answers
Introduction
Deploy application
Decide what is the target platform Remember dependency on the QT libraries And dont forget yourself-made libraries And your executable file Make a package as your way You do better than I !
Introduction
Agenda
What is QT? QT architecture Install QT New terms Object model Common used type First Example Project file Signals and Slots Model/View programming QMainWindow Build Application GUI Designer tool Linguist tool Deploy application Reference links Questions and Answers
Introduction
Reference Links
QT is very wide and you can swim in it more
Introduction
Agenda
What is QT? QT architecture Install QT New terms Object model Common used type First Example Project file Signals and Slots Model/View programming QMainWindow Build Application GUI Designer tool Linguist tool Deploy application Reference links Questions and Answers
Introduction
I refer