[Qgis-developer] Upgraded collapsible groupboxes

Etienne Tourigny etourigny.dev at gmail.com
Fri Sep 14 07:54:54 PDT 2012


I have pushed a fix for this directly in QgsCollapsibleGroupBox, by
finding the parent QScrollArea widget and scrolling down when
expanding. I needed to call QApplication::processEvents() before
mParentScrollArea->ensureWidgetVisible( this );

This works in both dialogs that use the collapsible group box (raster
save as and label editor).

In the case that layout is different, there is still the
collapsedStateChanged( QWidget* ) signal that is emitted.

I have also pushed a layout fix when using the Oxygen theme (common in
KDE desktops), thanks to the help of Radim and Larry, as well as a few
other fixes by Larry.

Etienne

On Thu, Sep 13, 2012 at 2:02 AM, Larry Shaffer <larrys at dakotacarto.com> wrote:
> Hi,
>
> On Wed, Sep 12, 2012 at 11:00 AM, Etienne Tourigny
> <etourigny.dev at gmail.com> wrote:
>> Hi, thanks for your input
>>
>> I have tried to fix that issue, but didn't find a working solution yet
>> (there is code in there addressing that issue). I think that Qt does
>> not scroll down, because part of the widget is already visible. If
>> anyone has a suggestion I would appreciate it.
>
> Not sure how that would be possible from the QgsCollapsibleGroupBox
> class, since the custom groupbox could be placed anywhere, not just in
> a scroll area. What Leyan is suggesting (I think) would have to be
> some slot in the dialog's class that catches the signal when one of
> its children collapsible groupboxes is expanded, then figures the
> current scroll position of the groupbox and how much of it is hidden,
> then scrolls appropriately to expose the whole groupbox.
>
> This would be somewhat similar to toolbox behavior, though without the
> horrible 'hide everything else' aspect of that widget. A nice feature
> to have, but probably a pain to add to many dialogs... unless we
> create a custom Designer plugin scroll area class with such a slot so
> that the signal of every collapsible groupbox it contains could be
> assigned to it in Designer. The QgsCollapsibleGroupBox class would
> also have to be a QtDesigner plugin, which Etienne has already worked
> on.
>
> Regards,
>
> Larry
>
>> Etienne
>>
>> On Wed, Sep 12, 2012 at 12:46 PM, 欧阳乐岩 <ouyang.leyan at hotmail.com> wrote:
>>>
>>>
>>> On 09/12/2012 02:15 AM, Larry Shaffer wrote:
>>>>
>>>> Hi,
>>>>
>>>> Over the past couple of days Etienne Tourigny and I have upgraded the
>>>> functionality of the QgsCollapsibleGroupBox class he recently
>>>> introduced. The changes have been pushed to master branch and can be
>>>> seen in the Save As... dialog for raster layers and in the scroll
>>>> areas of the 3 tabs in the PAL Labeling options.
>>>>
>>>> We have tested on some Linux versions and on Mac. *Feedback on the
>>>> look and functionality, as well as any OS-specific issues, would be
>>>> greatly appreciated.* It would be best to make sure these new changes
>>>> work on (hopefully) every supported platform before using them more
>>>> extensively.
>>>
>>>
>>> Hi,
>>>
>>> It seems to be working well for me (compiled under Archlinux). Just one
>>> small remark:
>>> * For a long dialog like "Save as ..." for rasters, I need to scroll to see
>>> everything. When the "Pyramids" groupbox is closed, the area scrolls
>>> automatically to hide the resulting blank space, which is nice. However,
>>> when opening the "Pyramids" groupbox, the dialog does not scroll down to
>>> show the newly visible options. It would be nice to show them, as if we open
>>> the groupbox we are probably interested in its content.
>>>
>>> Regards,
>>>
>>> Leyan
>>>
>>> _______________________________________________
>>> Qgis-developer mailing list
>>> Qgis-developer at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>> _______________________________________________
>> Qgis-developer mailing list
>> Qgis-developer at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-developer


More information about the Qgis-developer mailing list