Thanks for your replies,
I understand for dialogs, their are sometimes drawed using QWidgets
where native do not provide them.
Ok for C++ solution, that's not that complicated, but it is still some
work you do not need to do with QWidgets.
But Qt5 is still young, maybe we could have such API in Core in the
future, with QML element being able to display that stuff (filedialog,
treeview, ...) - some QML desktop component maybe (but at the moment
those are still bound to QtWidgets...)
Best Regards,
Stéphane
**
Le 04-01-13 07:52, Bo Thorsen a écrit :
??????? ?????? is correct. You have to write C++ for this. The reason
is that there is no javascript framework available to you, and JS as a
language is almost completely stripped of features.
In your case, you are trying to do stuff with files. That's one case
where you are going to be disappointed. There is no file handling
available in QML/JS at all. Yes, there are a few models available
(like FolderListModel), but simple file handling isn't there.
The dialogs can't be moved to QtGui because there are implementations
that use the Qt widgets. Not all systems provide a file dialog that Qt
can use.
You could find a javascript framework and use this instead. But it's
probably easier for you to write and deploy C++ based Qt code. Make a
simple class and export what you need to QML with it.
Bo.
Den 03-01-2013 22:39, ??????? ?????? skrev:
Most likely, you'll have to write on C++ your component. You also can
use FolderListModel
(http://doc.qt.digia.com/qt/qml-folderlistmodel.html).
For example, for my needs I made this:
http://pastebin.com/??BSPF3sBw <http://pastebin.com/BSPF3sBw>
http://pastebin.com/sxw??Cb3e5 <http://pastebin.com/sxwCb3e5>
???????, 3 ?????? 2013, 21:54 +01:00 ?? Stéphane Fabry <s...@xris.eu>:
Hello,
Let's say I'd like to make a desktop application with Qt5 and
QtQuick2, the new era :)
How can I simply prompt a file dialog, or display in my QML
filesystem entries ?
Both QFileDialog and QFileSystemModel are still in QtWidget module :(
I think they should go in QtGui.
--
*Stéphane Fabry*
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org??/mailman/listinfo/interest
<http://lists.qt-project.org/mailman/listinfo/interest>
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest
Bo Thorsen.
--
Fionia Software - Qt experts for hire.
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest