本文整理汇总了C++中QCursor::handle方法的典型用法代码示例。如果您正苦于以下问题:C++ QCursor::handle方法的具体用法?C++ QCursor::handle怎么用?C++ QCursor::handle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QCursor
的用法示例。
在下文中一共展示了QCursor::handle方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void
PlayField::changeCursor(const QCursor& c) {
if (cursor_.handle() == c.handle()) return;
cursor_ = c;
QWidget::setCursor(c);
}
示例2: grabMouse
void QWidget::grabMouse(const QCursor &cursor)
{
if (qt_mouseGrb)
qt_mouseGrb->releaseMouse();
qwsDisplay()->grabMouse(this,true);
qwsDisplay()->selectCursor(this, cursor.handle());
qt_mouseGrb = this;
qt_pressGrab = 0;
}
示例3: qt_symbian_setWindowGroupCursor
/*
* Makes the specified cursor appear above a specific native window group
* Called from QSymbianControl and QApplication::restoreOverrideCursor
*
* Window server is needed for this, so there is no equivalent when using
* the sprite workaround.
*/
void qt_symbian_setWindowGroupCursor(const QCursor &cursor, RWindowTreeNode &node)
{
Qt::HANDLE handle = cursor.handle();
if (handle) {
RWsPointerCursor *pcurs = reinterpret_cast<RWsPointerCursor *> (handle);
node.SetCustomPointerCursor(*pcurs);
} else
#ifdef Q_SYMBIAN_HAS_SYSTEM_CURSORS
{
TInt shape = qt_symbian_translate_cursor_shape(cursor.shape());
node.SetPointerCursor(shape);
}
#else
qWarning("qt_s60_setWindowGroupCursor - null handle");
#endif
}
示例4: GiveFeedback
STDMETHODIMP QOleDropSource::GiveFeedback( DWORD dwEffect )
{
QCursor * cur;
QDropEvent::Action action = translateToQDropAction( dwEffect );
#ifdef DEBUG_QDND_SRC
qDebug( "QOleDropSource::GiveFeedback(dwEffect = %d)", action );
#endif
if ( currentAction != action ) {
currentAction = action;
}
if ( ( ( dwEffect & DROPEFFECT_COPY ) == DROPEFFECT_COPY ) &&
( ( drag_mode == QDragObject::DragCopy ) ||
( drag_mode == QDragObject::DragCopyOrMove ) ||
( drag_mode == QDragObject::DragDefault ) ) ) {
cur = copyCursor;
} else if ( ( ( dwEffect & DROPEFFECT_MOVE ) == DROPEFFECT_MOVE ) &&
( ( drag_mode == QDragObject::DragMove ) ||
( drag_mode == QDragObject::DragCopy ) || // windows-bug?
( drag_mode == QDragObject::DragCopyOrMove ) ||
( drag_mode == QDragObject::DragDefault ) ) ) {
cur = moveCursor;
} else if ( ( ( dwEffect & DROPEFFECT_LINK ) == DROPEFFECT_LINK ) &&
( ( drag_mode == QDragObject::DragLink ) ||
( drag_mode == QDragObject::DragDefault ) ) ) {
cur = linkCursor;
} else {
return ResultFromScode( DRAGDROP_S_USEDEFAULTCURSORS );
}
SetCursor( cur->handle() );
#ifndef QT_NO_CURSOR
qApp->setOverrideCursor( *cur, TRUE );
#endif
return ResultFromScode( S_OK );
}