First time to learn about GUI programming with QT4.
The QT modules:
QtCore
QtGUI
QtXML
QtSVG
QtOpenGL
QtNetWork
OBjects in QT:
QApplication: .exec() begin the main loop.
Widgets:
GDialog: setTitle
GPushButton: clicked()
GCheckBox
GLabel
GLineEdit
GSlider
GSpinBox
Layout:
QHBoxLayout
QVBoxLayout
QGridLayout
methods for layout:
addWidget
addLayout
addStrech
Q_OBJECT: QT MACRO SYSTEM, object, tr(), slots, signals ...
new object have slots and signals
connect(object1, SIGNAL(clicked(parameters 1)), object2, SLOT(clickedfun(parameters 2)))
the number of parameters1 must equal to parameters2
and the clickedfun must declared under the region of slots
and the function of slots could emit the a function which is declared in signals region.
and the install of QT building system under freebsd, actually I dont know how it works, I failed when using qmake, but it works when using qdevelop. it seems the QTDIR, QTSPECIFIC ... are not set correctly in my system. but left this question for later.
阅读(439) | 评论(0) | 转发(0) |