Results 1 to 2 of 2

Thread: Expose enums with webkit

  1. #1
    Join Date
    Nov 2010
    Posts
    22
    Thanks
    8
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Expose enums with webkit

    Hello, I am trying to expose a C++ enum to Javascript through Webkit bridge

    Currently I expose my class enum with Q_ENUMS(my_enum) and it is inserted into my webkit frame with addToJavaScriptWindowObject()

    I can already see the functions of such class from Javascript, but I do not see my enum. Only the functions. I have already exposed my enums to QML, and I suppose it should be similar with Javascript. Is there any extra step I must do? Or is it not possible?

    thanks in advance!

  2. #2
    Join Date
    Jun 2014
    Posts
    1
    Qt products
    Qt5
    Platforms
    Unix/X11

    Default Re: Expose enums with webkit

    I'd like to be able to do this too.

Similar Threads

  1. How to expose QMap to QML?
    By fonzi337 in forum Qt Quick
    Replies: 8
    Last Post: 9th September 2013, 16:00
  2. Expose C++ enum to QML
    By OnlyK in forum Qt Quick
    Replies: 3
    Last Post: 3rd August 2011, 07:43
  3. How to use enums in qml
    By nightroad in forum Qt Quick
    Replies: 0
    Last Post: 29th June 2011, 14:24
  4. How to expose c++ plugins to Qml/QtCreator
    By dwalker0044 in forum Qt Quick
    Replies: 8
    Last Post: 21st June 2011, 09:39
  5. how to use enums
    By soul_rebel in forum General Programming
    Replies: 3
    Last Post: 23rd March 2006, 22:49

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.