![]() ![]() Note: X11 does not provide appropriate cursors for all possible Qt::CursorShape values. ![]() If a cursor cannot be found using the name shown below, a standard X11 cursor will be used instead. The table below shows the cursor name used for each Qt::CursorShape value. On X11, Qt supports the Xcursor library, which allows for full color icon themes. Attempting to use a QCursor that was created before QGuiApplication will result in a crash. Note: It is possible to create a QCursor before QGuiApplication, but it is not useful except as a place-holder for a real QCursor created after QGuiApplication. To set or get the position of the mouse cursor use the static methods QCursor::pos() and QCursor::setPos(). 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 |