Language Selection

English French German Italian Portuguese Spanish

Cross-platform UI with Qt4 and Ruby - Mac/Linux HOWTO

Filed under
HowTos

Today I’ve spent the day working on figuring out how to make UIs using Ruby and Qt4. If you haven’t heard of it, Qt4 is an awesome UI framework written in C++. Since C++ is way too much work, some great KDE devs wrote a bindings generator for Qt4 called qt4-qtruby. While this package is fairly “linuxy”, it’s pretty easy to build it on Mac OS X too, making it possible to write GUI programs for OS X without having to delve into RubyCocoa which has too much hackiness (in my opinion), or even worse, Objective C. Furthermore, your code that you write on OS X will look great on Windows and Linux too!

Starting from scratch

First, install Ruby. If you’re using Linux, you’ll probably use the package manager to install Ruby and the Ruby development libraries! (Ubuntu will run sudo apt-get install ruby irb ruby-dev) OS X Tiger ships with Ruby by default, but you’ll want to install an updated version, via the Ruby one-click installer, then disable the old Ruby by using the following command:

more here




More in Tux Machines

ISO/IEC JTC1 Approves ODF 1.2 PAS Ballot

OASIS ODF 1.2, the current version of the Open Document Format standard, was approved by ISO/IEC JTC1 National Bodies after a 3-month Publicly Available Specification (PAS) ballot. The final vote for DIS 26300 was: 17-0 for Parts 1 and 2, and 18-0 for Part 3. Read more

KDE Applications and Platform 4.14.1 Officially Released

The KDE developers have released an update for KDE 4.14, which is actually the last version in the series. It will soon be replaced by KDE Frameworks 5, KDE Plasma, and KDE Applications. The entire system is now much more modular and the projects have been decoupled. The devs won't have to follow the same version number, so there will be some misunderstandings in the future. Read more

Popcorn Time 0.3.3 Released With Support External Media Players And Chromecast, More

Popcorn Time 0.3.3 was released today and it comes with quite a few new features, including support for external players such as VLC, XBMC, MPlayer, mpv and others, Chromecast and Airplay support, 3 new themes and more. Read more

Making of GNOME 3.14

The release of GNOME 3.14 is slowly approaching, so I stole some time from actual design work and created this little promo to show what goes into a release that probably isn’t immediately obvious (and a large portion of it doesn’t even make it in). Read more