QtCore学习

来源:互联网 发布:枫叶之国加拿大 知乎 编辑:程序博客网 时间:2024/06/11 02:39

• Basic types

   • int
   • bool
   • double
   • char

   QString

   QList<T>

   QStringList  QList<QString>

   QDate   QDateTime

   QChar  – 16-bit Unicode character

   QByteArray

   QEvent

   QEventLoop

           QHash

• QLibrary – Used to load dynamic libraries and resolve symbols in libraries
• QQueue – Template class implementing a FIFO queue
• QPoint, QRect – Rectangle is defined using the top left and bottom right
QPoints
• QTimer – One shot or periodic 1 ms timer (where applicable)
• QVariant – Union of the common Qt types
• QVector – Template class for dynamic arrays (flat), QLinkedList more
efficient, if many insertion and deletion operations needed
• Iterator classes – Java (QVectorIterator) and STL-like
(QVector<T>::iterator) iterators exist

 

QObject 

• Heart of Qt's object model
• Base class for all object classes
• Provides object trees and object ownership
• QObject's responsibility is to provide a central location for the most important
concepts in Qt
• Has three major responsibilities
• Memory Management
• Introspection
• Event handling

 

• Memory management
• QObject base class
• Parent/Child relationship
• Signal/Slot mechanism
• Property system