我正在寻找一种很好的方法来解决将Qt应用程序移植到Qt/Necessitas(Android)的问题.
一些QtGUI小部件绝对是残酷的 - 不幸的是,包括QFileDialog.
你知道任何具有适当外观和感觉的替换品吗?是否可以使QFileDialog在Necessitas开发人员的高优先级附近使用?
#include <QApplication>
#include <QFileDialog>
int main(int argc, char* argv[]) {
QApplication a(argc, argv);
QString fileName = QFileDialog::getOpenFileName(NULL,
QObject::tr("Open Image"), "/home/jana", QObject::tr("Image Files (*.png *.jpg *.bmp)"));
a.exec();
}
Run Code Online (Sandbox Code Playgroud)

我下载了Linux 的Necessitas安装程序,但我无法在调试器的Android VM上运行我的"Hello World"Qt应用程序.
它给出了这个错误:
Can't find Ministro service.
The application can't start.
Run Code Online (Sandbox Code Playgroud)

这是来自Qt Creator的调试日志:
Starting remote process...D/dalvikvm( 2497): GC freed 699 objects / 55432 bytes in 152ms
D/dalvikvm( 2497): GC freed 65 objects / 2640 bytes in 58ms
W/System.err( 2497): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=market://search?q=pname:org.kde.necessitas.ministro }
W/System.err( 2497): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1408)
W/System.err( 2497): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1378)
W/System.err( 2497): at android.app.Activity.startActivityForResult(Activity.java:2749)
W/System.err( 2497): at org.kde.necessitas.origo.QtActivity$4.onClick(QtActivity.java:266)
W/System.err( 2497): at com.android.internal.app.AlertController$ButtonHandler.handleMessage(AlertController.java:158)
W/System.err( 2497): at android.os.Handler.dispatchMessage(Handler.java:99)
W/System.err( 2497): …Run Code Online (Sandbox Code Playgroud)