Results 1 to 3 of 3

Thread: Creating Custom Arrow for label

  1. #1
    Join Date
    Jun 2013
    Posts
    58
    Thanks
    26
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Windows

    Question Creating Custom Arrow for label

    Label within class
    I can change the cursor icon from the Qt ui dropdown list.

    I'm trying to add my own cursor a "circumpunct"
    This is what I got:
    Qt Code:
    1. setOverrideCursor(QCursor(QPixmap("CircumpunctCursor.bmp")));
    To copy to clipboard, switch view to plain text mode 

    Not sure where to place the code?
    & is the code correct?

    Thanks

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Creating Custom Arrow for label

    Are you trying to change the cursor for:
    Qt Code:
    1. QCursor customCursor(QPixmap("CircumpunctCursor.bmp"));
    2.  
    3. // the entire program:
    4. QApplication::setOverrideCursor(customCursor);
    5. ...
    6. QApplication::restoreOverrideCursor();
    7.  
    8. // or just the one widget:
    9. widget->setCursor(customCursor);
    To copy to clipboard, switch view to plain text mode 
    You are using a relative file path so this code will only work if the BMP file is found in the current working directory of the process.

  3. The following user says thank you to ChrisW67 for this useful post:

    ebsaith (19th June 2013)

  4. #3
    Join Date
    Jun 2013
    Posts
    58
    Thanks
    26
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Windows

    Wink Re: Creating Custom Arrow for label

    Thanks, Works Like a dream
    Last edited by ebsaith; 19th June 2013 at 09:05. Reason: updated contents

Similar Threads

  1. Replies: 7
    Last Post: 23rd September 2012, 17:53
  2. Creating custom plugin
    By T4ng10r in forum Qt Programming
    Replies: 9
    Last Post: 18th August 2012, 00:37
  3. Creating click events for label
    By InterFiction in forum Newbie
    Replies: 9
    Last Post: 25th November 2011, 03:31
  4. Replies: 0
    Last Post: 17th March 2011, 20:38
  5. Creating custom scrollbars
    By Luc4 in forum Qt Programming
    Replies: 2
    Last Post: 12th March 2010, 13:34

Tags for this Thread

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.