If you want to create a cursor with your own bitmap, either use the QCursor constructor which takes a bitmap and a mask or the constructor which takes a pixmap as arguments. To set a cursor shape use QCursor::setShape() or use the QCursor constructor which takes the shape as argument, or you can use one of the predefined cursors defined in the Qt::CursorShape enum. To associate a cursor with all widgets (normally for a short period of time), use QGuiApplication::setOverrideCursor(). To associate a cursor with a widget, use QWidget::setCursor(). Qt has a number of standard cursor shapes, but you can also make custom cursor shapes based on a QBitmap, a mask and a hotspot. This class is mainly used to create mouse cursors that are associated with particular widgets and to get and set the position of the mouse cursor.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |