PDA

View Full Version : WaitCursor is ignored



mpi
3rd November 2009, 10:40
Hey,

I want to display a widget as disabled (setEnabled(false)) with its cursor set to Qt::WaitCursor. Disabling the widget, however, always display the widget with a normal Qt::ArrowCursor. How do I obtain a disabled widget with a Qt::WaitCursor. Code that reproduces the problem is shown below.

Best regards,

Mads


#include <QWidget>
#include <QApplication>
#include <QCursor>

int main(int argc, char *argv[])
{
QApplication app(argc, argv);

QWidget *widget = new QWidget;
widget->show();

QCursor cursor(Qt::WaitCursor);
widget->setCursor(cursor);
widget->setDisabled(true);

return app.exec();
}

high_flyer
3rd November 2009, 11:05
the code you posted works perfectly for me, I get the wait cursor over the widget, if I comment out the wait cursor in your code the cursor gets to be the normal arrow.

mpi
3rd November 2009, 11:09
I was expecting something like this. What system are you on?

Mine is:

Ubuntu 8.04
qt-x11-opensource-src-4.5.2
Gnome 2.22.3

high_flyer
3rd November 2009, 11:11
At the moment I am on XPSP3, I ran this example on Creator but with MS compiler, Qt4.4.3 commercial.

mpi
3rd November 2009, 11:16
Some more info:

Fails on: KUbuntu 9.04 and Ubuntu 9.04, Qt 4.5.2
Works on Mac OS X 10.6.2, Qt 4.6.0-beta1

high_flyer
3rd November 2009, 11:18
Have a look at the bug tracker... maybe its a known issue.

mpi
3rd November 2009, 11:24
Where do I find the bug tracker?

Mads

high_flyer
3rd November 2009, 12:01
http://qt.nokia.com/developer/task-tracker/index_html?method=front