faure at kde.org
Mon Jan 15 15:34:53 GMT 2007
On Tuesday 02 January 2007 13:17, Rafael Fernández López wrote:
> In my way of locating the problem, I've seen where the evil borns. The
> true thing is that this patch *IS NOT VALID IN ANY CASE*. This patch
> will let the button live while the delegate was removed (because the
> job finished), and some things more... but the important thing right
> now is that it lets the interaction with user, lets select the row
> (before when clicked on the row, it wasn't redrawn to show it was
> selected), and the most important thing, the delegate is being updated
> when the editor is opened (always in job lifetime), if any other
> changse happened to the job (for example, if it is a download job and
> it progressed a bit more...).
> The patch is attached, and since I found where it starts would be nice
> to check why if that line is uncommented the delegate isn't updated
> never while the editor is opened. I have searched on the Qt code for
> the editors object, and I didn't found nothing interesting really
> (like a paint method overriden or something), nothing found.
Editors are widgets, they are painted the normal way for a QWidget (paintEvent).
If this is about a pushbutton, you don't need an editor -at all-.
Just override editorEvent in the delegate, and handle the clicks
(press -> set boolean, release inside the button and the boolean is set ->
call code that must be called when clicking the button)
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
More information about the kde-core-devel