|
1Qter豆
QT说明手册中的 setOverrideCursor函数的原型为void QApplication::setOverrideCursor ( const QCursor & cursor, bool replace = FALSE ) [静态]
接收的第一个参数是QCursor对象的引用。 但是为什么调用的什么可以写成下面这样呢?
QApplication::setOverrideCursor( Qt::WaitCursor );
这个函数中传入的实参是 Qt::WaitCursor ,而 Qt::WaitCursor 是一个枚举类型。为什么可以这样调用呢?疑惑中?
QCursor这个中的构造函数如下:
QCursor()
QCursor(Qt::CursorShape shape)
QCursor(const QBitmap & bitmap, const QBitmap & mask, int hotX = -1, int hotY = -1)
QCursor(const QPixmap & pixmap, int hotX = -1, int hotY = -1)
QCursor(const QCursor & c)
QCursor(QCursor && other)
~QCursor()
其中第二个构造函数接受的参数类型是Qt::CursorShape shape 这个枚举类型。 setOverrideCursor函数传入参数的类型和这个构造函数有关系吗?
|
|