An Introduction to Qt 4

An Introduction to Qt 4

AnAn IntroductionIntroduction toto QtQt 44 Jason Trent [email protected] OOuutltliinnee . Why Trolltech? . Why Qt? . Qt 4 Widgets, Datatypes, and Structures . Qt Designer . qmake . Qt without C++ . Demo WWhhyy TTrroolllltetecchh?? .. QQtt aanndd QQttooppiiaa CCoorree aarree OOppeenn SSoouurrccee .. SSuuppppoorrtteedd bbyy mmuullttii--mmiilllliioonn ddoollllaarr ccoommppaannyy WWhhyy QQt?t? .. MMuullttii--ppllaattffoorrmm – No “virtual machines” or emulation layers – Native compilation for Windows, X11, and Mac • Utilizes core OS technologies (Core, Aero, …) – Extensions - ActiveQt, Motif Migration WWhhyy QQt?t? Over 400 C++ Classes . Not just a GUI toolkit – File handling – Networking – Process handling – Threading – Database access – Event loop processing – XML processing – OpenGL integration – and beyond WWhhyy QQt?t? .. IInntteerrnnaattiioonnaalliizzaattiioonn – Built in support for Unicode and Translation • Language and font aware layouts • Bidirectional font support • Mixed-international interface .. SSeeee QQtt LLiinngguuiisstt ffoorr mmoorree WWhhyy QQt?t? .. NNoott jjuusstt mmuuttllii--ppllaattiiffoorrmm,, mmuullttii--aarrcchhiitteeccttuurree .. QQttooppiiaa CCoorree 44 SSeerriieess – Support for embedded devices • Cell phones, PDAs, etc… – Supports Qt4 widgets with little to no code change QQWWiiddggeett TThhee mmeeeekk mmaayy iinnhheerriitt tthhee eeaarrtthh…… ……bbuutt tthhee eeaarrtthh sshhaallll iinnhheerriitt QQWWiiddggeett QWidget QQtt 44 WWiiddggeetsts .. IInnhheerriitt tthhee aallll--ppoowweerrffuull QQWWiiddggeett .. IInncclluuddee:: – QLabel – QPushButton – QTextBox – QDialog – QFileDialog – Many, many more SSiiggnnaallss aanndd SSllootsts .. PPrroovviiddee ccoommmmuunniiccaattiioonn bbeettwweeeenn oobbjjeeccttss .. AA ssiiggnnaall iiss eemmiitttteedd aanndd sslloottss rreeaacctt .. GGeetttteerrss aanndd SSeetttteerrss .. FFuunnccttiioonnss QQtt 44 DDaatatatytyppeess && SStrtruucctuturreess .. AAddvvaanncceedd ddaattaattyyppeess – QString – QDataStream .. SSttrruuccttuurreess – QList – QVector – QMap QQtt DDeessiiggnneerr . Powerful stand-alone interface builder . Ability to integrate into IDEs – Kdevelop, Visual Studio, … . Ability to preview on target platforms – Windows, Windows XP, Mac, Plastique, CDE, and Motif . Extensive layout system – Auto-scaling, font-aware layouts – Dynamically adjust layout for font size, direction, display size, language, operating system qqmmaakkee .. OOnnee pprroojjeecctt ffoorrmmaatt ttoo rruullee tthheemm aallll .. MMaaiinnttaaiinn ..pprroo pprroojjeecctt ffiillee – Automatically create target project • Makefile • XCode • Visual Studio TEMPLATE = app <!DOCTYPE RCC><RCC version="1.0"> INCLUDEPATH += . <qresource> QT += core gui network <file>images/logo.png</file> TARGET = iBoard <file>images/logo_mask.bmp</file> <file>images/save.png</file> # Input <file>images/clear.png</file> HEADERS += canvas.h \ <file>images/pencil.png</file> netconnect.h \ <file>images/pencil_mask.bmp</file> scMakefileribble.h <file>images/eraser.png</file> <file>images/eraser_mask.bmp</file> FORMS += staXCodertup4.ui Project (. x codeproj<file>images/)fill.png</file> <file>images/fill_mask.bmp</file> SOURCES += caVisualnvas.cpp \Studio (.v cproj <file>)images/print.png</file> netconnect.cpp \ </qresource> scribble.cpp \ </RCC> main.cpp RESOURCES = iBoard.qrc qqmmaakkee CCoommmmaanndd LLiinnee OOpptitioonnss .. --pprroojjeecctt – Auto-generate .pro file based on folder contents .. --ssppeecc [[mmaakkeessppeecc]] – Build the project or make file based on the make specification • linux-g++, macx-xcode, win32-mingw, … DemoDemo OOththeerr IteItemmss ooff InInteterreesstt .. PPyyQQtt -- QQtt eexxtteennssiioonnss ffoorr PPyytthhoonn .. PPeerrllQQtt -- QQtt eexxtteennssiioonnss ffoorr PPeerrll .. QQtt//JJaavvaa -- TTrroolllltteecchh ssuuppppoorrtteedd JJaavvaa eexxtteennssiioonnss – Coming Q1 2006 RReefeferreenncceess . Trolltech www.trolltech.com . Qt Forum www.qtforum.org . The Qt4 Resource Center qt4.digitalfanatics.org . Qt Centre www.qtcentre.org . C++ GUI Programming in Qt 3 www.phptr.com/perens . Slide format and many images from Trolltech Code Less. Create More..

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    20 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us