Style preview has a 0.5s lag
David Faure
dfaure at klaralvdalens-datakonsult.se
Mon Jun 16 00:14:47 BST 2003
On Sunday 15 June 2003 18:45, Scott Wheeler wrote:
> Basically it seems like this is what QWidget::setKeyCompression() is for:
>
> void QWidget::setKeyCompression ( bool compress ) [virtual protected]
> [...]
> If you turn it on and your program doesn't keep up with key input, Qt may try
> to compress key events so that more than one character can be processed in
> each event.
>
> For example, a word processor widget might receive 2, 3 or more characters in
> each QKeyEvent::text(), if the layout recalculation takes too long for the
> CPU.
> [...]
>
> -Scott
Note that last line - this is about compressing characters into ::text().
I don't think this helps at all, for the case of keeping the "arrow down"
key pressed for a while. Nothing to compress there (in terms of putting
QChars into a QString).
IMHO the best way is to simply listen to keyRelease events - you want
the preview to update when releasing the key_down key, no?
--
David Faure -- faure at kde.org, dfaure at klaralvdalens-datakonsult.se
Qt/KDE/KOffice developer
Klarälvdalens Datakonsult AB, Platform-independent software solutions
More information about the kde-core-devel
mailing list