PDA

View Full Version : How to Disable or hide cursor from QWidget?



ashukla
17th October 2007, 13:38
Hi!

how to Disable or hide cursor from QWidget.

marcel
17th October 2007, 13:43
Try with:


setCursor(QCursor(QPixmap()));

ashukla
17th October 2007, 14:22
Try with:


setCursor(QCursor(QPixmap()));

It is not working...
for parent widget w and its child widget f1, f2 & f3;

ashukla
17th October 2007, 14:28
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................?

Gopala Krishna
17th October 2007, 14:29
How about

widget->setCursor(Qt::BlankCursor)

EDIT: http://www.qtcentre.org/forum/f-qt-programming-2/t-how-to-disable-mouse-pointers-on-particular-qwidget-7818.html

ashukla
17th October 2007, 14:42
How about

widget->setCursor(Qt::BlankCursor)

EDIT: http://www.qtcentre.org/forum/f-qt-programming-2/t-how-to-disable-mouse-pointers-on-particular-qwidget-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.!