[Paraview] Properties tab for Extract Block
Paul Edwards
paul.m.edwards at gmail.com
Mon Mar 23 11:42:00 EDT 2009
It is a QTreeWidget that is created in the createWidgets function in
pqNamedObject.cxx. The spacing is occurring because the final row in the
layout is given a stretch factor. This is useful if you only have widgets
that do not stretch well (such as a line edit). I have added a flag that is
checked before applying this stretch factor to the last row. I have only
changed the COMPOSITE_TREE widget where I set the stretch to 2 and then
unset the flag. Below is the patch:
Index: Components/pqNamedWidgets.cxx
===================================================================
RCS file: /cvsroot/ParaView3/ParaView3/Qt/Components/pqNamedWidgets.cxx,v
retrieving revision 1.52
diff -r1.52 pqNamedWidgets.cxx
825a826,828
> // make the final expand unless this flag is reversed
> bool expandLastRow = true;
>
1359a1363,1364
> panelLayout->setRowStretch(rowCount, 2);
> expandLastRow = false;
1364c1369,1372
< panelLayout->setRowStretch(rowCount, 1);
---
> if (expandLastRow)
> {
> panelLayout->setRowStretch(rowCount, 1);
> }
Regards,
Paul
2009/3/23 Paul Edwards <paul.m.edwards at gmail.com>
> I've tried modifying sizeHint (adding extra number of rows for default and
> just returning a huge QSize) for pqTreeWidget. I've also tried setting the
> sizePolicy to MinimumExpanding but still no luck. It doesn't seem to be
> effecting the size at all. Any ideas?
>
> Thanks,
> Paul
>
>
> 2009/3/23 Utkarsh Ayachit <utkarsh.ayachit at kitware.com>
>
> If I am not mistaken, that happening because we use a custom subclass,
>> pqTreeWidget for the tree. I'd look at pqTreeWidget and it's
>> size-related code sections.
>>
>>
>>
>> 2009/3/23 Paul Edwards <paul.m.edwards at gmail.com>:
>> > Hello,
>> >
>> > I would like make the tree view use all the available space in the
>> > properties tab for the Extact Block filter. At the moment this is split
>> > 50/50 with the checkbox. Is there an easy way to do this? Or could
>> someone
>> > point me in the direction for the file that I will need to be editing in
>> > order to change this?
>> >
>> > Thanks in advance,
>> > Paul
>> >
>> > _______________________________________________
>> > Powered by www.kitware.com
>> >
>> > Visit other Kitware open-source projects at
>> > http://www.kitware.com/opensource/opensource.html
>> >
>> > Please keep messages on-topic and check the ParaView Wiki at:
>> > http://paraview.org/Wiki/ParaView
>> >
>> > Follow this link to subscribe/unsubscribe:
>> > http://www.paraview.org/mailman/listinfo/paraview
>> >
>> >
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20090323/6927506a/attachment.htm>
More information about the ParaView
mailing list