[Interest] Qt and remote files?

Matthew Woehlke mwoehlke.floss at gmail.com
Wed Jan 13 19:49:32 CET 2016


On 2016-01-13 11:06, Thiago Macieira wrote:
> On Wednesday 13 January 2016 10:16:36 Matthew Woehlke wrote:
>> I see that in Qt 5, QFileDialog has gained methods to work with URL's
>> instead of (just) local paths. How does this work? (Does it integrate
>> with e.g. KIO where supported?) 
> 
> The Qt file dialog doesn't. The URL-based APIs are there to support 
> KFileDialog, which gets used via the KDE integration plugin.

Oookay... So on Linux/KF5, QFileDialog::getOpenFileUrl will use the KF5
dialog and can return network locations, correct? What about on other
platforms, e.g. Windows?

>> And how do I go about opening or saving
>> such a remote file via Qt? (Are they supported directly by QFile /
>> QSaveFile, or do I need to use other mechanisms?)
> 
> You use KIO or another remote file API. Qt doesn't provide one.

Bah. KF5's tutorials (which say to use QSaveFile) are wrong, then :-(.

Thanks.

-- 
Matthew




More information about the Interest mailing list