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

Jessie Release Date: 2015-04-25

We now have a target release date of Saturday the 25th of April. We have checked with core teams, and this seems to be acceptable for everyone. This means we are able to begin the final preparations for a release of Debian 8 - "Jessie". The intention is only to lift the date if something really critical pops up that is not possible to handle as an errata, or if we end up technically unable to release that weekend. Please keep in mind that we intend to have a quiet period from Saturday the 18th of April. Bug fixes must be *in Jessie* before then. Read more

Radeon Linux Benchmarks: Catalyst 15.3 Beta vs. Linux 4.0 + Mesa 10.6-devel

Before ending out March, here's some new OpenGL Linux benchmarks comparing the closed-source Catalyst 15.3 Beta driver against the Linux 4.0 development kernel with Mesa 10.6 Git for the freshest open-source graphics driver code. Read more

5 questions to determine if open source is a good fit for a software project

A benefit of open source in general, and commercial open source in particular, is that you have the support of others as well as the ability to do the maintenance yourself. I hope these questions will help you determine whether open source is a good fit for your next software project. Let me know if there are other questions you would add to this list. Read more