[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: Style preview has a 0.5s lag
From: David Faure <dfaure () klaralvdalens-datakonsult ! se>
Date: 2003-06-15 23:14:47
[Download RAW message or body]
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@kde.org, dfaure@klaralvdalens-datakonsult.se
Qt/KDE/KOffice developer
Klarälvdalens Datakonsult AB, Platform-independent software solutions
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic