Skip to content
Attempt to create a Ruby GUI framework based on QML WebEngineView and HTML5.
Ruby QML HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
example
lib
LICENSE
README.asciidoc
htmlui.gemspec

README.asciidoc

HTMLUI

HTMLUI is a framework that can be used to create GUI applications using HTML and Ruby.

Here is [a really simple example](https://github.com/timkoi/htmlui/tree/master/example) that demostrates the basics of using HTMLUI.

Installation

HTMLUI is still considered experimental and, as such, no stable releases are available (yet). To use HTMLUI, you’ll have to build it from sources, which is pretty easy.

You will need:

  • Ruby 2.0 or later

  • Qt 5.9 or later

  • qml Ruby gem

If you are on macOS and you have MacPorts installed, all the dependencies can be installed using these commands:

$ sudo port install qt5-qtwebengine qt5-qtbase
$ sudo sh -c "PREFIX=\"/opt/local/libexec/qt5/bin:$PREFIX\" gem install -N qml"

Now build the binary gem for htmlui and install it:

$ gem build htmlui.gemspec
$ sudo gem install --local htmlui-1.0.0.gem

Status

What works?

  • Rendering HTML pages using QML WebEngineView

  • Calling Ruby code from HTML

  • Calling JavaScript from HTML

  • Creating alerts from Ruby

  • Loading internal/external JavaScript or CSS

  • Retreiving information about HTML elements from Ruby

  • Calling file selection dialog from Ruby

What does not work or is not implemented (yet)?

  • Creating input boxes from Ruby

License

MIT License

You can’t perform that action at this time.