Portal support in Qt and KDEΒΆ
Qt and KDE libraries will transparently use portals for some functionality when they detect that they are being used inside a Flatpak sandbox. Here are some hints for what Qt or KDE applications should do to benefit from this.
- Use
QDesktopServices::openUrl(const QUrl &url)orKIO::KRunto open URIs or send an email when usingmailtoURL - Use
QFileDialogclass to open files. Avoid usingQFileDialog::DontUseNativeDialog. Note that portals cannot currently give access to directories on the host filesystem - Use
KNotification::notify()to show notification