[PyKDE] strange UI behaviour in QHeader

Andrew Dalke adalke at mindspring.com
Thu Apr 18 22:39:44 BST 2002


I realize this is a Qt issue and not a PyQt one, but I
figured people here might know the answer.

I'm seeing some strange UI behaviour in the QHeader.  Here's
the reproducible

Open 'designer', make a new dialog, and plop down a table.
The default table size is 3x3.

(This behaviour exists in a stock PyQt QTable as well, so it
isn't an issue of the designer.)

Press Ctrl-T to test the form, or use the appropriate pulldown.

Double-right-click on the seperator between columns 1 and 2.
Notice that nothing happens.  This is expected.

Use the left mouse button to jostle the seperator slightly, in
either direction.  This shifts the columns, which is expected.

Now double-right-click on the seperator between the first two
columns.  Notice that the first column shrinks to the minimum
width needed to display the column text.  THIS IS NOT EXPECTED.
Either it should always shrink or never shrink -- there's no
reason to have to jostle it first.

There is a similar behaviour with a double click of the left
mouse button on the seperator, with one minor difference.  There's
no need to jostle the seperator first.  You cannot double right
click to autosize the seperator unless it has first been moved,
while you can do so with the left button.

Can someone explain to me why this makes sense or is useful?
In the meanwhile, I can eliminate it by filtering out double
right clicks on the header.

Is there any page on trolltech.com which describes this behaviour,
both for left double click and right double click?  I couldn't
find one.

                    Andrew
                    dalke at dalkescientific.com






More information about the PyQt mailing list