[PyKDE] bug fixes

Andrew Dalke adalke at mindspring.com
Sat May 4 11:20:01 BST 2002

Hey all,

  A couple weeks back I reported two bugs, in emails titled
    strange UI behaviour in QHeader
    bug in QListView{Item} height?

Just to let you all know, these were bugs in Qt.  The first
bug (where middle and right double clicks cause a QHeader autoresize)
was fixed by them but is not in the 3.0.4 release.  Here's a patch
(you'll have to apply it by hand)

qtable.cpp ==== 
@@ -5841,6 +5841,8 @@ 
void QTableHeader::mouseDoubleClickEvent( QMouseEvent *e ) 
+    if ( e->button() != LeftButton ) 
+ return; 
     if ( isResizing ) { 
int p = real_pos( e->pos(), orientation() ) + offset(); 
int section = sectionAt( p ); 

The second one had incorrect expand/collapse boxes for a
hierarchical listview when I used a large image for one of the
rows.  The problem is that a value in qwindowsstyle.cpp and
qmotifstyle.cpp was computed as a loop invariant when it wasn't.
Here's the patch I just sent to trolltech for the first file --
the fix for the second file is an identical shifting of the
calculation for 'lh' inside of the
    while ( child && y < r.height() ) {

For some reason they couldn't reproduce the bug on their machine.
Using the same code on my machines produced a different display
than on theirs.  Specifically, my expand/collapse boxes were
vertically centered but theirs wasn't.  But there's no way I
could see in the code for that to happen.  Still trying to figure
that one out...  Maybe their tech support was using an old version
of the toolkit?

                    dalke at dalkescientific.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: qwindowsstyle.diff
Type: application/octet-stream
Size: 1227 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20020504/984d4b2f/qwindowsstyle.obj

More information about the PyQt mailing list