[Qgis-developer] Mac Use of QFileDialog

Marco Hugentobler marco.hugentobler at karto.baug.ethz.ch
Mon May 19 03:32:54 EDT 2008


Hi Tom,

I wonder if the Trolls would be interested to integrate this directly into 
QFileDialog? It would then also apply in each plugin that uses QFileDialog. 

Until they (Trolltech) do, +1 for the qgisapp.cpp patch.

Regards,
Marco



Am Montag 19 Mai 2008 06:37:38 schrieb Tom Elwertowski:
> Attached is a patch which uses setSidebarUrls to access multiple Mac drives
> and make QFileDialog look more like a Mac dialog. It has two deficiencies.
>
> 1. The volumes are listed alphabetically rather by mount order.
>
> 2. If you navigate into the root of the boot volume, for example
> /Applications or /Network, QFileDialog discovers that /Volumes should be
> invisible and no longer lets you browse /Volumes. The workaround is to
> cancel and open the dialog again. If the user goes directly to an external
> volume, this won't be noticed.
>
>
> This demo patch only fixes file dialogs in qgisapp.cpp. These are probably
> the most noticeable. To fix them all, QFileDialog needs to subclassed. I'll
> do this if other Mac users think this is better than the current
> QFileDialog behavior.
>
> Tom
>
> Tom Elwertowski wrote:
> > QFileDialog is not including /Volumes in its left sidebar. This appears
> > to be a Qt bug which I will report. I will suggest that they approximate
> > the sidebar of a native file dialog as much as possible but definitely
> > show all volumes. Under /Computer I see /dev/fd. It doesn't show
> > anything useful but perhaps is supposed to show volumes.
> >
> > QFileDialog has a setSidebarUrls() method. A workaround for now is to
> > use this to append the /Volumes list ourselves.



-- 
Dr. Marco Hugentobler
Institute of Cartography
ETH Zurich
Technical Advisor QGIS Project Steering Committee


More information about the Qgis-developer mailing list