Bryan Gardiner

Qtah

Qtah is a set of Qt bindings for Haskell, providing a traditional imperative interface to a mature GUI toolkit.  Qtah uses Hoppy to bind to C++ code, and is free software under the Lesser General Public License v3.

As of version 0.3.0, Qtah includes 126 of the main classes from QtCore, QtGui, and QtWidgets. Patches for any area are welcome, so if you'd like to contribute or give feedback, send me an email or head on over to GitLab (link below).  Adding a new function or method is usually just a few lines of code.

Thanks to the Qt documentation mentioning when items are added to the API, Qtah can generate bindings for arbitrary versions of Qt.  Currently 4.8 (the last 4.x release) and all 5.x versions are supported, though I am only testing against stable Qt versions on Gentoo and NixOS.

I have Goatee partly ported to Qtah: screenshot.

News

2017-06-10: Qtah 0.3.0 has been released, with lots of new graphics and model-view classes, fixes to build under Homebrew on OS X, and with qtah-cpp using a parallel build by default now. Also, because even Qt 4.8 is old now, support for versions of Qt before 4.8 is now dropped.

2017-01-14: Released an updated qtah-examples-0.2.1 that warns when being linked statically, since it's not obvious that this doesn't work.

2016-12-16: Released Qtah 0.2 with support for Hoppy 0.3.0, Cabal 1.24, some new Qt classes, and a QPoint/QPointF bug fixed.

2016-08-04: Released qtah-generator-0.1.2, qtah-cpp-0.1.2, qtah-0.1.1 with fixes for the packages' install phases.  Fresh working ebuilds posted as well.

2016-07-10: Now available on Hackage.

2016-02-08: Released!

Features

Obtaining

Qtah configured for Qt 5 is available on Hackage as qtah-qt5.  I would be happy to upload a Qt 4 package as well if anyone wants one.  During installation, Qtah will automatically configure itself for the specific Qt version you have installed.  There are examples available in qtah-examples, and also some supporting packages qtah-cpp-qt5 and qtah-generator that are used in the build process.

$ cabal install qtah-qt5
$ cabal install --enable-executable-dynamic qtah-examples

Using, building, and extending Qtah is documented in the readmeAPI documentation is available.

Gentoo users can use the ebuilds in my overlay, and Nix expressions are available for Nix users.

Development

Qtah is hosted on GitLab: project page, issue tracker.  Clone the source from one of: