02-10-2013 04:38 AM - edited 02-10-2013 09:25 AM
Hi
Is there a way to make FilePicker select and display only folders (or any other cascades class? )
I have tried the save mode. It seems perfect except the fact that we have to set a file Name at the end.
Can we make it not ask for file name ?
I tried using QT QFileDialog but it just crashes the app
QString dir = QFileDialog::getExistingDirectory(0, tr("Open Directory"),
QString("/accounts/1000/removable/sdcard/"),
QFileDialog:: ShowDirsOnly | QFileDialog:: DontResolveSymlinks);
thanks
Solved! Go to Solution.
02-12-2013 12:16 PM
Try setting the FilePickerMode to "Saver":
https://developer.blackberry.com/cascades/referenc
02-12-2013 12:24 PM
Yes i tried that and its almost perfect , BUT we have to select a file name before close.
Saver mode expects to save a file at a location. I couldnt make it select only a folder.
What i want is for the user to be able to select just a folder which i can then use to search for some stuff.
thanks
02-12-2013 12:35 PM
Ah, I see now where you said you already tried that ![]()
I just tried mode: FilePickerMode.SaverMultiple and that seems to do the trick!
02-12-2013 01:47 PM - edited 02-12-2013 01:48 PM
I used FilePicker in Saver mode without setting the file name in QML.
And, if I'm not wrong, you need to pick some folder with FilePicker and then use the returned path of it right ?
02-13-2013 02:47 AM
man ... how i miss that ![]()
it works great , thanks all
02-25-2013 04:55 AM
Actually, using FilePickerMode.SaverMultiple can be also problematic. E.g. it won't allow you to select a folder if you don't have write permissions for it (but you should be able to select it for reading purposes). And you also cannot rename the "Save" button to something else. (E.g. "Select").
02-25-2013 05:13 AM
I didnt test this but it seems logical for selecting a save folder and so will break for read only access.
Do we have any folder in shared / sdcard without write access ?
03-12-2013 02:55 PM
Hi all,
Am doing photo upload in BB-10, i have used filepicker in qml,when user clicks upload photo option i need to show only camera pictures and photos pictures,insted of that am showing all of the options like books,documents,music,print etc.. how can i filter only photos option..?
directories : ["/accounts/1000/shared/camera"]
i have used like this,but not getting correct result is there any other way to implement this
Thanks
03-13-2013 01:05 AM
"If the directories are not specified,FilePicker, in Picker Mode, will display the folders associated with the specified file type or navigate to the default folder in Saver Mode"
So maybe you can try to set the file type filter as Picture