简体   繁体   English

Qt for iOS:如何从Qt应用程序(iefrom QMainWindow或QWidget或其他任何东西)打开iOS组件?

[英]Qt for iOS: How to open iOS component from Qt Application (i.e.from QMainWindow or QWidget or anything)?

I have requirement to open HTML content on iOS application. 我要求在iOS应用程序上打开HTML内容。 Currently I am using Qt for iOS which does not have support for QtWebKitsWidgets . 目前我正在使用Qt for iOS,它不支持QtWebKitsWidgets So now I am planning to open UIWebView using UIViewController of iOS from Qt application. 所以现在我打算使用Qt应用程序中的iOS的UIViewController打开UIWebView I have tried to open UIViewController from dummy UIViewController using presentViewController method but it is not opening anything on QMainWindow . 我试图使用presentViewController方法从虚拟UIViewController打开UIViewController ,但它没有在QMainWindow上打开任何东西。

Let me know whether such thing is possible or not. 让我知道这样的事情是否可能。 If possible then guide me through some suggestions. 如果可能的话,请引导我完成一些建议。 Let me know if more detail is required. 如果需要更多详细信息,请与我们联系。 I am modifying example given by Qt for iOS only. 我正在修改Qt for iOS给出的示例。 Note that I am using Qt5.2.0 for iOS. 请注意,我使用的是Qt5.2.0 for iOS。

The Qt documentation points to this example of how to integrate a native iOS controller with a QML application. Qt文档指向了如何将本机iOS控制器与QML应用程序集成的示例。

https://github.com/richardmg/qtdd13_qmlapp https://github.com/richardmg/qtdd13_qmlapp

It implements bringing up UIImagePickerController over a QML display. 它实现了在QML显示上调出UIImagePickerController。

So, while you can't integrate a UIWebView with QML content, you can push a new controller on containing it or maybe even can super-impose a UIWebView on top of the QML view. 因此,虽然您无法将UIWebView与QML内容集成,但您可以推送包含它的新控制器,甚至可以在QML视图之上超级强加UIWebView。

It's possible (with the Qt4iOS iOS plugin) to use UIWebView from QWidget based apps, but not QML apps. (使用Qt4iOS iOS插件)可以使用基于QWidget的应用程序的UIWebView ,但不能使用QML应用程序。 The Digia iOS plugin does not support using UIWebView in any way (and won't any time soon). Digia iOS插件不支持以任何方式使用UIWebView (并且不会很快)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM