Results 1 to 10 of 10

Thread: setCursor

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: setCursor


  2. #2
    Join Date
    Jan 2006
    Location
    Sta. Eugènia de Berga (Vic - Barcelona - Spain)
    Posts
    869
    Thanks
    70
    Thanked 59 Times in 57 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: setCursor

    Hi,

    Thanks,
    Òscar Llarch i Galán

  3. #3
    Join Date
    Jan 2006
    Location
    Sta. Eugènia de Berga (Vic - Barcelona - Spain)
    Posts
    869
    Thanks
    70
    Thanked 59 Times in 57 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: setCursor

    Hi,

    I'm not able to make it work.

    I've tryied:

    QApplication::setOverrideCursor(Qt::ArrowCursor);
    QApplication::changeOverrideCursor(Qt::ArrowCursor );
    setCursor(Qt::ArrowCursor);

    Thanks,
    Òscar Llarch i Galán

  4. #4
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: setCursor

    How are u setting the code ??
    Can we see the code ??

  5. #5
    Join Date
    Jan 2006
    Location
    Sta. Eugènia de Berga (Vic - Barcelona - Spain)
    Posts
    869
    Thanks
    70
    Thanked 59 Times in 57 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: setCursor

    Hi,

    This is the slot that is called when the action is triggered

    Qt Code:
    1. void MYmainWindow::mySlot()
    2. {
    3. setCursor(Qt::WaitCursor);
    4. //Also tryied:
    5. //QApplication::setOverrideCursor(Qt::WaitCursor);
    6. }
    To copy to clipboard, switch view to plain text mode 
    Òscar Llarch i Galán

  6. #6
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: setCursor

    I guess, Line 5 should be
    QApplication::setOverrideCursor(QCursor(Qt::WaitCu rsor));
    u didnt make an object of the cursor !!

  7. #7
    Join Date
    Jan 2006
    Location
    Sta. Eugènia de Berga (Vic - Barcelona - Spain)
    Posts
    869
    Thanks
    70
    Thanked 59 Times in 57 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: setCursor

    Hi,

    Your code and mine does the same.

    It set's the WaitCursor just a moment and then returns to ArrowCursor.

    Mmmm, the slot, changes the cursor and then calls a object method that starts a thread. If I disable the call to this method, the WaitCursor is correctly showed. So, when "QThread:start()" is called, the aplication restores it's original cursor?
    Òscar Llarch i Galán

Similar Threads

  1. setCursor
    By mickey in forum Qt Programming
    Replies: 4
    Last Post: 23rd April 2006, 20:39

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.