Results 1 to 7 of 7

Thread: QwtPlot cursor

  1. #1
    Join Date
    Jun 2009
    Posts
    27
    Thanks
    3
    Qt products
    Qt4
    Platforms
    MacOS X

    Default QwtPlot cursor

    Hi,

    On my qwtplot the mouse cursor looks like this +.
    I used myPlot->setCursor(Qt::ArrowCursor); but it didnt work. I also tried Qcursor::setshape() How can I make cursor like normal arrow on myPlot.

    Cheers,

  2. #2
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,311
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QwtPlot cursor

    myPlot->canvas()->setCursor(...);

    Uwe

  3. The following 3 users say thank you to Uwe for this useful post:

    gorec323 (14th January 2016), hamid ghous (14th April 2010), romanesen (23rd March 2011)

  4. #3
    Join Date
    Sep 2009
    Posts
    57
    Thanks
    7
    Thanked 5 Times in 4 Posts

    Default Re: QwtPlot cursor

    Quote Originally Posted by Uwe View Post
    myPlot->canvas()->setCursor(...);
    Sorry to resurrect an ancient thread, but seems like the best place to ask this (it appears high in a google search).

    How do you change the cursor colour when over a canvas ?

    The reason I ask is that on Windows when I have a dark canvas I get a black cursor that is very hard to see.

    Thanks,
    Mark

  5. #4
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,311
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QwtPlot cursor

    And what exactly do you need to know, what has not been already answered in this thread ?

    Uwe

  6. #5
    Join Date
    Sep 2009
    Posts
    57
    Thanks
    7
    Thanked 5 Times in 4 Posts

    Default Re: QwtPlot cursor

    How to set the cursor color.

  7. #6
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,311
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QwtPlot cursor

    See QWidget::setCursor(). There is nothing of value I could add, that is not covered by the docs of QCursor.

    Uwe

  8. #7
    Join Date
    Nov 2010
    Posts
    47
    Thanks
    7
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QwtPlot cursor

    Quote Originally Posted by liversedge View Post
    How to set the cursor color.
    Change cursor pixmap like this:

    Qt Code:
    1. canvas()->setCursor(QCursor(QPixmap(":/resources/red_cursor.png")));
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. Problems of embedded QWebView in QGraphicsView
    By naruto_9w in forum Qt Programming
    Replies: 2
    Last Post: 20th February 2009, 15:22
  2. Change cursor & status during Drag & Drop
    By ronlongo in forum Qt Programming
    Replies: 0
    Last Post: 1st December 2008, 16:56
  3. Is it possible to change the cursor on a QGraphicsView?
    By draftpunk in forum Qt Programming
    Replies: 2
    Last Post: 25th October 2008, 18:43
  4. Trouble with cursor and selecting text in QTextEdit
    By R_Torsten in forum Qt Programming
    Replies: 3
    Last Post: 7th June 2008, 19:17
  5. Cursor not changing
    By bpetty in forum Newbie
    Replies: 4
    Last Post: 17th July 2007, 15:13

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.