[Interest] Qt and remote files?
Thiago Macieira
thiago.macieira at intel.com
Wed Jan 13 23:13:58 CET 2016
On Wednesday 13 January 2016 13:49:32 Matthew Woehlke wrote:
> 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?
Correct. On other platforms, it depends on the capabilities of their file
dialogs.
> >> 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 :-(.
QSaveFile is local file only.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
More information about the Interest
mailing list