QT中的数据类型--转自<QtGlobal> - Global Qt Declarations

本文档介绍了<QtGlobal>头文件中包含的全局Qt声明,包括基本类型定义、函数和宏。这些类型部分为基本类型提供便利定义,确保在所有支持Qt的平台上具有特定位宽,部分与Qt的消息处理相关。函数涉及消息生成、Qt版本处理以及对象值的比较和调整。宏则允许程序员在其应用中添加编译器或平台特定的代码,或者用于大型操作的便利宏。
摘要由CSDN通过智能技术生成

<QtGlobal> - Global Qt Declarations

The <QtGlobal> header file includes the fundamental global declarations. It is included by most other Qt header files. More...

Types

typedefQtMsgHandler
enumQtMsgType { QtDebugMsg, QtWarningMsg, QtCriticalMsg, QtFatalMsg, QtSystemMsg }
typedefqint8
typedefqint16
typedefqint32
typedefqint64
typedefqlonglong
typedefqptrdiff
typedefqreal
typedefquint8
typedefquint16
typedefquint32
typedefquint64
typedefquintptr
typedefqulonglong
typedefuchar
typedefuint
typedefulong
typedefushort

Functions

TqAbs ( const T & value )
const T &qBound ( const T & min, const T & value, const T & max )
voidqCritical ( const char * msg, ... )
voidqDebug ( const char * msg, ... )
voidqFatal ( const char * msg, ... )
boolqFuzzyCompare ( double p1, double p2 )
boolqFuzzyCompare ( float p1, float p2 )
QtMsgHandlerqInstallMsgHandler ( QtMsgHandler handler )
intqMacVersion ()
const T &qMax ( const T & value1, const T & value2 )
const T &qMin ( const T & value1, const T & value2 )
qint64qRound64 ( qreal value )
intqRound ( qreal value )
const char *qVersion ()
voidqWarning ( const char * msg, ... )
T *q_check_ptr ( T * pointer )
QByteArrayqgetenv ( const char * varName )
boolqputenv ( const char * varName, const QByteArray &value )
intqrand ()
voidqsrand ( uint seed )
QStringqtTrId ( const char * id, int n = -1 )
voidqt_set_sequence_auto_mnemonic ( bool on )
intqt_symbian_exception2Error ( const std::exception &aThrow )
voidqt_symbian_exception2LeaveL ( const std::exception &aThrow )
voidqt_symbian_throwIfError ( int error )

Macros

 QT_POINTER_SIZE
 QT_REQUIRE_VERSION ( int argc, char ** argv, const char *version )
 QT_TRANSLATE_NOOP3 ( contextsourceTextcomment )
 QT_TRANSLATE_NOOP ( contextsourceText )
 QT_TRAP_THROWING ( function )
 QT_TRID_NOOP ( id )
 QT_TRYCATCH_ERROR ( errorfunction )
 QT_TRYCATCH_LEAVING ( function )
 QT_TR_NOOP ( sourceText )
 QT_VERSION
 QT_VERSION_CHECK
 QT_VERSION_STR
voidQ_ASSERT ( bool test )
voidQ_ASSERT_X ( bool test, const char * where, const char *what )
 Q_BIG_ENDIAN
 Q_BYTE_ORDER
 Q_CC_BOR
 Q_CC_CDS
 Q_CC_COMEAU
 Q_CC_DEC
 Q_CC_EDG
 Q_CC_GHS
 Q_CC_GNU
 Q_CC_HIGHC
 Q_CC_HPACC
 Q_CC_INTEL
 Q_CC_KAI
 Q_CC_MIPS
 Q_CC_MSVC
 Q_CC_MWERKS
 Q_CC_OC
 Q_CC_PGI
 Q_CC_SUN
 Q_CC_SYM
 Q_CC_USLC
 Q_CC_WAT
voidQ_CHECK_PTR ( void * pointer )
 Q_DECLARE_TYPEINFO ( TypeFlags )
 Q_DECL_EXPORT
 Q_DECL_IMPORT
 Q_FOREACH ( variablecontainer )
 Q_FOREVER
const char *Q_FUNC_INFO ()
qint64Q_INT64_C ( literal )
 Q_LITTLE_ENDIAN
 Q_OS_AIX
 Q_OS_BSD4
 Q_OS_BSDI
 Q_OS_CYGWIN
 Q_OS_DARWIN
 Q_OS_DGUX
 Q_OS_DYNIX
 Q_OS_FREEBSD
 Q_OS_HPUX
 Q_OS_HURD
 Q_OS_IRIX
 Q_OS_LINUX
 Q_OS_LYNX
 Q_OS_MAC
 Q_OS_MSDOS
 Q_OS_NETBSD
 Q_OS_OS2
 Q_OS_OPENBSD
 Q_OS_OS2EMX
 Q_OS_OSF
 Q_OS_QNX
 Q_OS_RELIANT
 Q_OS_SCO
 Q_OS_SOLARIS
 Q_OS_SYMBIAN
 Q_OS_ULTRIX
 Q_OS_UNIX
 Q_OS_UNIXWARE
 Q_OS_WIN32
 Q_OS_WINCE
quint64Q_UINT64_C ( literal )
 Q_UNUSED ( name )
 Q_WS_S60
 Q_WS_X11
 Q_WS_MAC
 Q_WS_QWS
 Q_WS_WIN
 foreach ( variablecontainer )
 forever
const char *qPrintable ( const QString & str )

The global declarations include typesfunctions and macros.

The type definitions are partly convenience definitions for basic types (some of which guarantee certain bit-sizes on all platforms supported by Qt), partly types related to Qt message handling. The functions are related to generating messages, Qt version handling and comparing and adjusting object values. And finally, some of the declared macros enable programmers to add compiler or platform specific code to their applications, while others are convenience macros for larger operations.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值