2015-12-23 17 views

回答

1

综观qwindowscursor.cpp来源:

switch (cursorShape) { 
case Qt::SplitVCursor: 
    return createPixmapCursorFromData(systemCursorSize(), standardCursorSize(), 32, vsplit_bits, vsplitm_bits); 
case Qt::SplitHCursor: 
    return createPixmapCursorFromData(systemCursorSize(), standardCursorSize(), 32, hsplit_bits, hsplitm_bits); 
case Qt::OpenHandCursor: 
    return createPixmapCursorFromData(systemCursorSize(), standardCursorSize(), 16, openhand_bits, openhandm_bits); 
case Qt::ClosedHandCursor: 
    return createPixmapCursorFromData(systemCursorSize(), standardCursorSize(), 16, closedhand_bits, closedhandm_bits); 
case Qt::DragCopyCursor: 
    return QCursor(QPixmap(copyDragCursorXpmC), 0, 0); 
case Qt::DragMoveCursor: 
    return QCursor(QPixmap(moveDragCursorXpmC), 0, 0); 
case Qt::DragLinkCursor: 
    return QCursor(QPixmap(linkDragCursorXpmC), 0, 0); 
} 

然后

// Non-standard Windows cursors are created from bitmaps 
static const uchar vsplit_bits[] = { 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x80, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xe0, 0x03, 0x00, 
    0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 
    0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0xff, 0x7f, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x7f, 0x00, 
    0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 
    0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0xe0, 0x03, 0x00, 
    0x00, 0xc0, 0x01, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; 

看起来Qt使用它是V/HSplit光标自己的位图。所以简短的答案是“不可能的”。长的答案是你必须修改提到的行并重新编译Qt。我怀疑你是否可以从windows中获得你提到的光标,因为它看起来非标准,Qt中的位图是有原因的。祝你好运,承诺,如果你做到这一点:)

+0

或者,您可以修改位图本身并重新编译Qt - 快速和肮脏。 –

+0

我可以建议[打开错误报告](https://bugreports.qt.io/)吗?这是最好的上游固定的东西。 (此外,我想知道那些游标对应哪个'IDC_ *'宏...) – peppe

+0

看起来你是对的。我认为有没有修改QT的方式。 –