Results 1 to 6 of 6

Thread: How to Disable or hide cursor from QWidget?

  1. #1
    Join Date
    Aug 2007
    Location
    Gorakhpur, India
    Posts
    254
    Thanks
    8
    Thanked 14 Times in 14 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Question How to Disable or hide cursor from QWidget?

    Hi!

    how to Disable or hide cursor from QWidget.
    Anurag Shukla
    A man who never makes mistake is the man who never does anything! Theodre Rosvelt!

  2. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to Disable or hide cursor from QWidget?

    Try with:
    Qt Code:
    1. setCursor(QCursor(QPixmap()));
    To copy to clipboard, switch view to plain text mode 

  3. #3
    Join Date
    Aug 2007
    Location
    Gorakhpur, India
    Posts
    254
    Thanks
    8
    Thanked 14 Times in 14 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: How to Disable or hide cursor from QWidget?

    Quote Originally Posted by marcel View Post
    Try with:
    Qt Code:
    1. setCursor(QCursor(QPixmap()));
    To copy to clipboard, switch view to plain text mode 
    It is not working...
    for parent widget w and its child widget f1, f2 & f3;
    Anurag Shukla
    A man who never makes mistake is the man who never does anything! Theodre Rosvelt!

  4. #4
    Join Date
    Aug 2007
    Location
    Gorakhpur, India
    Posts
    254
    Thanks
    8
    Thanked 14 Times in 14 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: How to Disable or hide cursor from QWidget?

    when I ran an another form constructor........
    it does not hide the curor...
    it shows previously.......
    it gives the following warning upon the console..........
    X Error: BadPixmap (invalid Pixmap parameter) 4
    Major opcode: 93 (X_CreateCursor)
    Resource id: 0x0
    X Error: BadCursor (invalid Cursor parameter) 6
    Major opcode: 2 (X_ChangeWindowAttributes)
    Resource id: 0x3800009

    What I do................?
    Anurag Shukla
    A man who never makes mistake is the man who never does anything! Theodre Rosvelt!

  5. #5
    Join Date
    Aug 2006
    Location
    Bangalore,India
    Posts
    419
    Thanks
    37
    Thanked 53 Times in 40 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: How to Disable or hide cursor from QWidget?

    How about
    Qt Code:
    1. widget->setCursor(Qt::BlankCursor)
    To copy to clipboard, switch view to plain text mode 

    EDIT: http://www.qtcentre.org/forum/f-qt-p...dget-7818.html
    The biggest difference between time and space is that you can't reuse time.
    -- Merrick Furst

  6. The following user says thank you to Gopala Krishna for this useful post:

    ashukla (17th October 2007)

  7. #6
    Join Date
    Aug 2007
    Location
    Gorakhpur, India
    Posts
    254
    Thanks
    8
    Thanked 14 Times in 14 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Thumbs up Re: How to Disable or hide cursor from QWidget?

    Quote Originally Posted by Gopala Krishna View Post
    How about
    Qt Code:
    1. widget->setCursor(Qt::BlankCursor)
    To copy to clipboard, switch view to plain text mode 

    EDIT: http://www.qtcentre.org/forum/f-qt-p...dget-7818.html
    I have already use this because I am getting the function so I serach it...
    setCursor(QCursor(Qt::BlankCursor));
    Thanks for ur response.!
    Anurag Shukla
    A man who never makes mistake is the man who never does anything! Theodre Rosvelt!

Similar Threads

  1. How to disable Mouse pointers on particular QWidget
    By rajeshs in forum Qt Programming
    Replies: 4
    Last Post: 1st July 2007, 17:05
  2. How to disable maximum event in QWidget??
    By hesummar in forum Qt Programming
    Replies: 2
    Last Post: 28th October 2006, 13:21

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.