[Qgis-developer] Mac Use of QFileDialog

Tom Elwertowski telwertowski at comcast.net
Mon May 19 13:02:19 EDT 2008


Marco Hugentobler wrote:
> 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. 

This has been added as Trolltech Task Tracker entry 212103.
http://trolltech.com/developer/task-tracker/index_html?method=entry&id=212103

> 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.
> 
> 
> 



More information about the Qgis-developer mailing list