Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Call for Presentations - Qt World Summit

    Embed native iOS/Android UI into Qt?

    Mobile and Embedded
    4
    9
    4816
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • K
      kenjichanhkg last edited by

      I need to have a map on my apps and have some overlays on it. Since Qt 5.2.1 has no webkit support on both platforms, I think I must do that with native UI.

      Dose anyone know how to mix/embed native MKMapView (iOS) or MapView (Android) into a QWidget?

      Is that possible with Qt 5.2? Are there any example/demo code that mix native UI into Qt?

      Thanks!

      1 Reply Last reply Reply Quote 0
      • K
        kenjichanhkg last edited by

        After looking into the Qt5 source code and the doc. I've found a class QMacCocoaViewContainer that can put NSView into Qt in OS X and I guess that might work for iOS as well. (haven't tested yet)

        http://qt-project.org/doc/qt-5/qmaccocoaviewcontainer.html

        How about android? Has anyone tried that before?

        1 Reply Last reply Reply Quote 0
        • K
          kenjichanhkg last edited by

          I've just tested QMacCocoaViewContainer...

          The header is there, but the source not compiled?

          Undefined symbols for architecture armv7:
          "typeinfo for QMacCocoaViewContainer", referenced from:
          typeinfo for NativeButton in NativeButton.o
          "QMacCocoaViewContainer::metaObject() const", referenced from:
          vtable for NativeButton in NativeButton.o
          "QMacCocoaViewContainer::setCocoaView(NSView*)", referenced from:
          NativeButton::NativeButton(QWidget*) in NativeButton.o
          "QMacCocoaViewContainer::qt_metacast(char const*)", referenced from:
          vtable for NativeButton in NativeButton.o

          1 Reply Last reply Reply Quote 0
          • SGaist
            SGaist Lifetime Qt Champion last edited by

            Hi,

            AFAIK, it's currently built only for OS X

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply Reply Quote 0
            • D
              DonRico last edited by

              I'm also interested in embeding native mapView (or webview) but at the moment it seems I'm quite stuck. Any updates in progress of solving this task?
              It's kinda weird that this problem isn't discussed more often even though big part of interactive mobile apps needs to show map at some point and it should be quite hot topic.

              1 Reply Last reply Reply Quote 0
              • K
                kenjichanhkg last edited by

                Hi DonRico,

                I totally gave up Qt for mobile development. Reasons:

                • LGPL License is not possible as iOS not allowing dynamic link libs
                • I do*n't like QML and the standard/desktop UI is not suitable for mobile use
                • Qt for Mobile is "too" new, things don't look ready for production yet

                Now, I'm trying to use Unity3d + NGUI:
                Pros:

                • Suitable to create flexible UI
                • A lot of freedom with OpenGL, like additional effects.
                • C# is easier to find programmers to master
                • support more platforms, even web browser (version 5 support webGL, no plug required)
                • a very different component-base design, that might be a good thing

                Cons:

                • (still) expensive license fee if you want to remove splash screen
                • the built in UI framework in Unity 4 is suck. A lot of people are using a plugin framework call NGUI. I think it might be good enough for games, but not good for General apps developments

                even though NGUI isn't suitable, but the foundation in Unity is good, and I'm trying to create my own UI framework that's inspired by NGUI

                For creating a map UI, I'm not going to use any system map kit/framework, because I need complete control over the overlay rendering, not just simple lines/points.

                To do that, I use tiles from OSM or bing and re-create the same/similar experience (zoom, pan, rotate)

                An example for Unity3d + NGUI:

                • http://www.tasharen.com/windward/
                1 Reply Last reply Reply Quote 0
                • D
                  DonRico last edited by

                  Huh, well that's not good. Though we would like to stick with Qt at the moment and it seems a bit too small problem (MapView / WebView) to quit. Since I'm not too experienced with Qt I would really appreciate I somebody could give me some starting direction where look.

                  Can I use Android native visual components (i.e WebView, MapView .. etc ) in Qt applications by using QAndroidJniObject class (I'm pretty sure I expressed myself badly but try to stick with me) ?

                  1 Reply Last reply Reply Quote 0
                  • K
                    kenjichanhkg last edited by

                    There are many problems.
                    How do you solve the licensing problem?

                    I was hoping if someone helped me too, but there is nobody actually helping.

                    1 Reply Last reply Reply Quote 0
                    • A
                      adolby last edited by

                      Would it be possible to leverage Qt Location? I thought, but wasn't able to confirm if Qt 5.2 or 5.3 was intending to add support for Qt Mobility on iOS.

                      http://qt-project.org/quarterly/view/location_and_mapping_services

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post