seanchas116 / ruby-qml

A QML / Qt Quick bindings for Ruby
http://seanchas116.github.io/ruby-qml
MIT License
136 stars 17 forks source link

Adding QtWebEngine Support #20

Open rawberg opened 9 years ago

rawberg commented 9 years ago

I was able to get ruby-qml working with Qt 5.5.0-beta on OSX! QtWebEngine loads but crashes immediately because QtWebEngine::initialize must be called before it can be used.

Where is the correct place to call QtWebEngine::initialize in a ruby-qml app? For reference the go-qml project has an open pull request to support QtWebEngine.

seanchas116 commented 9 years ago

ruby-qml has QML.on_init method (https://github.com/seanchas116/ruby-qml/blob/master/lib/qml/application.rb#L57) for register custom initializations that run after QML initialization. (for example, QML::Access.register_to_qml uses this method) You can call QtWebEngine::initialize from there via some Qt C++ plugins.

seanchas116 commented 9 years ago

The plugin that ruby-qml loads by default is here: https://github.com/seanchas116/ruby-qml/tree/master/ext/qml/rubyqml-plugin