Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to create a custom native OSX webkit widget with Objective C?
QtWS25 Last Chance

How to create a custom native OSX webkit widget with Objective C?

Scheduled Pinned Locked Moved Unsolved General and Desktop
objective-cwebkitqt5.5custom widgetosx
4 Posts 3 Posters 2.0k Views
  • 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.
  • M Offline
    M Offline
    maximo
    wrote on last edited by
    #1

    Using Qt 5.5, how does one create a custom widget? See, I'd like to use the native webkit that's part of the OSX operating system. I've been teaching myself Objective C this week and pretty much have that down now -- does it require that I do something in Objective C?

    What I'd like to do is create a custom widget that uses the native webkit that's part of OSX, and then have it embed a Qt/C++ object into the Javascript so that for instance when I click a button in Webkit, my Javascript can call some class method in my Qt/C++.

    I'm aware of the tech preview in Qt5. However, I found that it was buggy and not ready for primetime. When you start adding form controls in the HTML on it, they show up all wonky.

    Another route is that I could create the application in Objective C + the webkit widget for it, and then somehow bridge that to call compiled Qt/C++ dylibs through the Javascript, if that's possible.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      QMacNativeWidget might be of interest.

      Hope it helps

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

      M 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        QMacNativeWidget might be of interest.

        Hope it helps

        M Offline
        M Offline
        maximo
        wrote on last edited by
        #3

        @SGaist LOL!!! Now why didn't I know about this sooner? My project had grown to 30MB, zipped, and 40MB unzipped, because I was using Qt's version of Webkit.

        I'll give this a shot and report back.

        t.dechangyT 1 Reply Last reply
        0
        • M maximo

          @SGaist LOL!!! Now why didn't I know about this sooner? My project had grown to 30MB, zipped, and 40MB unzipped, because I was using Qt's version of Webkit.

          I'll give this a shot and report back.

          t.dechangyT Offline
          t.dechangyT Offline
          t.dechangy
          wrote on last edited by
          #4

          Hi @maximo, did you have success with the MacNativeWidget and didi it reach your requirements.

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved