Qt4-preview-feedback Archive, March 2007
QApplication::restoreOverrideCursor() can not restore cursor
Message 1 in thread
Hi Sir,
Under QT 4.3.0Beta, QApplication::restoreOverrideCursor() can not
restore the cursor set by
QApplication::setOverrideCursor( QCursor(Qt::WaitCursor) )
It is easy to reproduce by running the following example under
different version(ex. Qt 4.2.3 and Qt 4.3.0Beta).
===============================================
#include <QApplication>
#include <QLabel>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QApplication::setOverrideCursor( QCursor(Qt::WaitCursor) );
(new QLabel(QT_VERSION_STR))->show();
QApplication::restoreOverrideCursor();
return app.exec();
}
===============================================
Cursor was restored under Qt 4.2.3, but not under Qt 4.3.0Beta.
Confirm please.
Regards,
--
[ signature omitted ]
Message 2 in thread
On Thu, 2007-03-29 at 11:42, Brad Pepers wrote:
> Howard Xia wrote:
> > Hi Sir,
> >
> > Under QT 4.3.0Beta, QApplication::restoreOverrideCursor() can not
> > restore the cursor set by
> > QApplication::setOverrideCursor( QCursor(Qt::WaitCursor) )
> >
> > It is easy to reproduce by running the following example under
> > different version(ex. Qt 4.2.3 and Qt 4.3.0Beta).
> >
> > ===============================================
> > #include <QApplication>
> > #include <QLabel>
> >
> > int main(int argc, char *argv[])
> > {
> > QApplication app(argc, argv);
> >
> > QApplication::setOverrideCursor( QCursor(Qt::WaitCursor) );
> > (new QLabel(QT_VERSION_STR))->show();
> > QApplication::restoreOverrideCursor();
> >
> > return app.exec();
> > }
> > ===============================================
> >
> > Cursor was restored under Qt 4.2.3, but not under Qt 4.3.0Beta.
> >
> > Confirm please.
>
> I saw the same thing in testing our application with 4.3.0beta. I think
> the cursor was restored if you moved it outside of the application
> window and then back in again.
You are right, seems the cursor can not be restored from the widget(s)
created between
QApplication::setOverrideCursor( QCursor(Qt::WaitCursor) )
and
QApplication::restoreOverrideCursor()
>
> --
> Brad
>
--
[ signature omitted ]
Message 3 in thread
On Thursday 29 March 2007 19:14, Howard Xia wrote:
> Cursor was restored under Qt 4.2.3, but not under Qt 4.3.0Beta.
>
> Confirm please.
Confirmed and fixed ;) Tomorrow's snapshot will work as expected.
Thanks for letting us know!
--
[ signature omitted ]