PDA

View Full Version : Expose enums with webkit



frank100
18th March 2012, 18:55
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!

yoshimitsu
30th June 2014, 03:16
I'd like to be able to do this too.