First, Basic dialog box
1, Core library:
Interface Program Qapplication
Non-Program Interface qcoreappliction
2, the message loop must execute Qapplication.exec ();
3, message binding mechanism: signal-Slot
The signal can correspond to a signal, or it can correspond to slots.
A signal can correspond to multiple signals and multiple slots.
4,QT Basic dialog box:
Qerrormessage,
Qinputdialog,
Qmessagebox,
Qprintdialog,
Qprogressdialog,
Qfiledialog,
Qabstractprintdialog,
Qcolordialog
Qfontdialog,
Qpagesetupdialog,
Qprintpreviewdialog,
Qwizard
5, form location information:
The Qwidget class is the base class of all user interface objects.
Obtained through a series of functions of Qwidget:
X (), Y () window upper-left corner coordinates
Framegeometry (), window rectangle
POS (), upper-left corner of window coordinates
Geometry (), window rectangle (excluding borders and title bars)
Width (), Height (), window height (without border and title bar)
Rect (), window rectangle, (0,0,xxx,xxx) (without Borders and title bars)
Size () window sizes (excluding borders and title bars)
6,qtoolbutton usage:
Qtoolbutton *btn;
BTN = new Qtoolbutton;
Btn->settext (tr ("text"));
Btn->seticon (Qpixmap (":/images/bb.png"));
Btn->seticonsize (Qpixmap (":/images/bb.png"). Size ());
Btn->setautoraise (TRUE);
Btn->settoolbuttonstyle (Qt::toolbuttontextundericon);
7, drawer form: Qtoolbox
8, Table Form: Qtablewidget
9. Dynamic Load UI
Quiloader loader;
QFile file (":/forms/dialog.ui");
File.Open (qfile::readonly);
Qwidget *dialog = Loader.load (&file);
File.close ();
Third->show ();
Chapter II Layout Management
1, Basic layout class
|---qboxlayout----------|---qhboxlayout
|---|---qvboxlayout
|---qgridlayout
AddWidget (); inserting controls
Addlayout (); Insert Layout
Setframestyle ();
Addstretch (); Insert Placeholder
2, multi-document Qworksspace
3, Split form Qsplitter
4, docked form Qdockwidget
5, Stack form Qstackedwidget
Chapter Three conversation window advanced
1, Extensible dialog box, very simple.
2, Palette Qpalette
SetColor ()
Setbrush ()
3, Window fades
Fade in principle: While the window appears, create a new blank form with the size of the window, with the timer from full opacity to become completely transparent.
Http://blog.chinaunix.net/uid-25749806-id-2911321.html
12 QT Basic dialogs, and the fade-in principle (the window becomes transparent using a timer)