[webkit-qt] Question on reloading changed CSS
grego at mpaja.com
Wed Oct 5 01:52:06 PDT 2011
I'm using Qt 4.7.4.
I have some code that rewrites CSS and then shows the new page.
To my surprise, the first attempt with:
did not work. Eventually after a while the new CSS was taken into account,
but not immediately.
I then delved into docs a bit, and tried:
which seemed to speed up the recognition of changed CSS, but it still was not
In the end I resorted following trickery:
QTimer::singleShot(100, ui->browser, SLOT(reload()));
which seems to work, but is a bit hacky.
The singleShot timer is required for *the very first time* CSS changes,
subsequently it seemed to work without it. As the pages I'm displaying are
very short, it does not seem to do any harm doing it every time.
I don't have Qt sources on this machine (yet), so I did not go down that
Anything obvious/subtle that I'm missing, or is the above a bug?
More information about the webkit-qt