Results 1 to 5 of 5

Thread: Colored cursor

  1. #1
    Join Date
    May 2007
    Location
    Lublin, Poland
    Posts
    345
    Thanks
    40
    Thanked 8 Times in 4 Posts
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Colored cursor

    Hi guys,

    I would like to ask how to create a, lets say, red cursor? I have my own red crosscursor pixmap, but the QCursor looks as supports only black/white/transparent colors.
    Thanks for any advice.

    Kacper
    Qt allows you to use everything you want
    wysota
    --------------------------------------------------------------------------------
    #if defined(Q_OS_UNIX) && defined(QT_DEBUG)
    abort(); // trap; generates core dump
    #else
    exit(1); // goodbye cruel world
    #endif

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Colored cursor

    Looks like you are right, at least according to the documentation.
    On X11, Qt supports the Xcursor library, which allows for full color icon themes
    This suggests full color cursors are not supported on other platforms. It might be a documentation flaw, though.

  3. #3
    Join Date
    May 2007
    Location
    Lublin, Poland
    Posts
    345
    Thanks
    40
    Thanked 8 Times in 4 Posts
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Thumbs up Re: Colored cursor

    Hi,

    THanks. This topic sounds a bit similar to the "red button" problem. It's less problematic thought. : )
    Ok, thanks for the comment.

    Kacper
    Qt allows you to use everything you want
    wysota
    --------------------------------------------------------------------------------
    #if defined(Q_OS_UNIX) && defined(QT_DEBUG)
    abort(); // trap; generates core dump
    #else
    exit(1); // goodbye cruel world
    #endif

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Colored cursor

    Coloured cursors should be available on all platforms, as when you drag an object, you can set a pixmap as a representation of the drag and it works on all platforms, as far as I know, so there are ways to have coloured cursors. Try peeking Qt's sources to find out more.

  5. #5
    Join Date
    May 2007
    Location
    Lublin, Poland
    Posts
    345
    Thanks
    40
    Thanked 8 Times in 4 Posts
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Colored cursor

    I can always create an item representing the cursor and move it as needed, but was looking for a "typical" solution : )

    Thanks
    Qt allows you to use everything you want
    wysota
    --------------------------------------------------------------------------------
    #if defined(Q_OS_UNIX) && defined(QT_DEBUG)
    abort(); // trap; generates core dump
    #else
    exit(1); // goodbye cruel world
    #endif

Similar Threads

  1. Setting manually cursor position on multi screen systems
    By irreriwan in forum Qt Programming
    Replies: 0
    Last Post: 4th March 2008, 10:47
  2. Problem with a cursor during Drag and Drop
    By mtrpoland in forum Qt Programming
    Replies: 1
    Last Post: 28th December 2007, 16:46
  3. QDockWidget splitter, cursor shape
    By alecs1 in forum Qt Programming
    Replies: 4
    Last Post: 12th December 2007, 19:44
  4. Cursor not changing
    By bpetty in forum Newbie
    Replies: 4
    Last Post: 17th July 2007, 16:13
  5. Replies: 7
    Last Post: 8th September 2006, 17:19

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.