Hmm the code seems to have disappeared and I can't edit or delete the original post.

Excerpt from AddEditEmployerView.qml:

Qt Code:
  1. folder: employersController.picturesLocation()
To copy to clipboard, switch view to plain text mode 

Excerpt from EmployersController.h:

Qt Code:
  1. #include <QDebug>
  2. #include <QStandardPaths>
  3. #include <QUrl>
  4.  
  5. Q_INVOKABLE QUrl picturesLocation() {
  6. QUrl url("file:///" + QStandardPaths::standardLocations(QStandardPaths::PicturesLocation).at(0));
  7. if (url.isEmpty())
  8. qDebug() << "Empty url!";
  9. else if (!url.isValid())
  10. qDebug() << "Invalid url!";
  11. else
  12. qDebug() << url;
  13. return url;
  14. }
To copy to clipboard, switch view to plain text mode