Reply
Thread Tools
Posts: 11 | Thanked: 4 times | Joined on Dec 2009 @ Lisboa, Portugal
#1
Hi, I'm trying to use the native file dialog from the maemo platform and, at the same time, preserve the last location used. If you open a file from directory A then, the next time you open the dialog, it should open in that directory.

My problem: I'm not being able to the get the native dialog in a way that allows to also get the directory the user navigated to.
  • QFileDialog::getOpenFileName(...) shows the native file dialog but I only have access to the selected file, not the dialog.
  • QFileDialog d(parent); d.exec(); shows the standard dialog (highly unusable in the N900) but I created the dialog so can get the selected file and directory.

Does any of you know how to get the "best" of both worlds, that is, use the native file dialog but still get access to the directory?
 
Posts: 11 | Thanked: 4 times | Joined on Dec 2009 @ Lisboa, Portugal
#2
Well, there is a very simple way that only occured to me now:

Code:
QString path = QFileDialog::getOpenFileName(...);
QDir dir = QFileInfo(path).dir();
 

The Following 2 Users Say Thank You to m4ktub For This Useful Post:
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 10:05.