Delegate strangeness

Rafael Fernández López ereslibre at gmail.com
Tue Jan 2 12:17:14 GMT 2007


Hi,

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.

You can find the new appearance at
http://www.maestroprogramador.com/screenshot2.png. There you can
notice how I'm clicking on the button (so it is redrawn properly), and
how the row is selected (what is impossible with that line on the
patch uncommented).

Bye,
Rafael Fernández López.
-------------- next part --------------
Index: src/gui/itemviews/qabstractitemview.cpp
===================================================================
--- src/gui/itemviews/qabstractitemview.cpp	(revisi��n: 618676)
+++ src/gui/itemviews/qabstractitemview.cpp	(copia de trabajo)
@@ -3174,7 +3174,7 @@ QWidget *QAbstractItemViewPrivate::edito
             QObject::connect(w, SIGNAL(destroyed(QObject*)), q, SLOT(editorDestroyed(QObject*)));
             delegate->updateEditorGeometry(w, options, index);
             delegate->setEditorData(w, index);
-            addEditor(index, w);
+            //addEditor(index, w);
             QWidget::setTabOrder(q, w);
 #ifndef QT_NO_LINEEDIT
             if (QLineEdit *le = ::qobject_cast<QLineEdit*>(w))
-------------- next part --------------
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


More information about the kde-core-devel mailing list