Results 1 to 9 of 9

Thread: qgraphicsview cursor setting logic

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: qgraphicsview cursor setting logic

    Quote Originally Posted by mcarter View Post
    With singleShot timer, I can get the delay but the single/slot does not allow any arguments, eg new cursorMask . . . but I can probably work around that.
    With invokeMethod, I can call the needed method with the proper argument, but I do not see a way to specify a delay? Am I missing something? Or are you saying to just use a 20 ms sleep?
    No, no sleep(). You can store the "argument" in some member variable and then fetch it from there when the timer fires.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  2. #2
    Join Date
    Nov 2009
    Location
    San Antonio, TX
    Posts
    69
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt Jambi
    Platforms
    Unix/X11 Windows

    Default Re: qgraphicsview cursor setting logic

    Right, no sleep . . . was just thinking how to use the invokeMethod.

    I implemented the singleShot timer, and while it works with my linux laptop, it does not seem to work on my windows test machine. The cursor changes, but once I move the mouse it reverts to the previous cursor again.

    I did find QTBUG-3732 and QTBUG-4190 in the Qt bug reports, which both seem exactly related to what I am seeing. However, they are both closed (2009/2010). What is the best procedure to re-open these bugs, because it looks like an obvious logic problem with the cursor and graphicsview. My suggestion would be to get rid of the internal originalCursor and use the cursor of the GraphicsView, since that it not really used anywhere, for the cursor of the viewport. I guess in the meantime I need to abort what I am trying to accomplish or try to "fix" graphicsview with my oen code.

    Also, when I was working in windows, I noticed that the cursors are really unusable with a view that is mostly black (especially CrossCursor) . . . the cursor just "disappears". Do I need to use a custom cursor to get the same feel as with linux and X11?

Similar Threads

  1. Replies: 3
    Last Post: 3rd September 2012, 07:32
  2. Setting manually cursor position on multi screen systems
    By irreriwan in forum Qt Programming
    Replies: 0
    Last Post: 4th March 2008, 09:47
  3. Setting a cursor on QTextEdit
    By Erlendhg in forum Qt Programming
    Replies: 6
    Last Post: 20th March 2007, 17:53
  4. setting Cursor for one operation
    By keshab in forum Newbie
    Replies: 1
    Last Post: 22nd December 2006, 08:09
  5. setting cursor problem in QTextEdit
    By jyoti kumar in forum Qt Programming
    Replies: 3
    Last Post: 19th May 2006, 08:17

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
  •  
Qt is a trademark of The Qt Company.