[Qt-interest] Qt Property to open a File from filesystem (not resource)

fungos fungos at gmail.com
Mon Apr 26 20:17:42 CEST 2010


No, I'm talking about Property Browser like QtDesigner.

On Mon, Apr 26, 2010 at 11:40 AM, prashant bhutani
<prashantbhutani2008 at gmail.com> wrote:
> On Mon, Apr 26, 2010 at 7:43 PM, fungos <fungos at gmail.com> wrote:
>>
>> Hi,
>
> Hi
>>
>> we are using QtTreePropertyBrowser and we need be able to select a
>> file with a filedialog from inside a property. We want something like
>> QVariant QIcon but with a filesystem file and not a resource file.
>
> you can use
>
> QString QFileDialog::getOpenFileName ( QWidget * parent = 0,
> const QString & caption = QString(), const QString & dir = QString(),
> const QString & filter = QString(), QString * selectedFilter =
> 0, Options options = 0 )
>
> This will return a QString for the path of the file file (in your case,
> picture/image path for QIcon) you will choose from the directory of your
> system.
> you can pass QDir::Current() as a third parameter to above function and
> filter the choice of your files with fourth parameter.
>
>> We
>> are not using Q_PROPERY but doing everything using
>> QtVariantPropertyManager and others. Anybody has a sample on how to
>> achieve this?
>>
> Hope this will help you. You can get more on this from the Qt Documentation
> .
>>
>> Thank you
>> _______________________________________________
>> Qt-interest mailing list
>> Qt-interest at trolltech.com
>> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
>
> --
> Prashant Bhutani
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>



-- 
Animal Liberation Front
http://www.animal-liberation.com/




More information about the Qt-interest-old mailing list