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

4MLinux 17.0 OS Hits the Stable Channel, Brings Firefox 46.0 & Thunderbird 45.0

Softpedia has been informed by 4MLinux developer Zbigniew Konojacki about the general availability of his 4MLinux 17.0 independent, desktop-oriented GNU/Linux distribution. Read more

Linux 4.6-rc6

Things continue to be fairly calm, although I'm pretty sure I'll still do an rc7 in this series. There's nothing particularly scary in here - there's a fix for a long-standing infiniband interface problem, but since you actually have to have the hardware for that, it's not like that is going to affect all that many people, and the workaround was pretty straightforward. The bulk of the rest is really just the normal random noise. Drivers (sound, gpu, ethernet being the bulk of it), architectures (arm, s390, x86), networking is the bulk of it. Shortlog appended for your edification, Linus Read more Also: Linux 4.6-rc6 Kernel Released, Codenamed "Charred Weasel"

DragonBox Pyra

  • DragonBox Pyra Goes Up For Pre-Order
    It's been a while since last hearing anything about the DragonBox Pyra as an open-source gaming handheld system and successor to OpenPandora...
  • Bitcoin is Now Accepted For DragonBox Pyra Pre-orders
    It is always good to see new merchants accepting Bitcoin payments, as it goes to show businesses want to attract an international clientele. DragonBox, a ship based in Germany, recently started accepting Bitcoin payments for their Pyra computer. A neat little device, which packs quite the punch.
  • DragonBox Pyra pre-orders begin (open Source handheld gaming PC)
    The DragonBox Pyra is a portable computer that looks like a cross between a tiny laptop and a Nintendo DX game console… and it kind of works like a cross between those devices as well. It’s got a 5 inch display, a QWERTY keyboard, the Debian Linux operating system that can handle desktop apps as well as games, and physical gaming buttons.

DragonBox Pyra pre-orders begin (open Source handheld gaming PC)

The DragonBox Pyra is a portable computer that looks like a cross between a tiny laptop and a Nintendo DX game console… and it kind of works like a cross between those devices as well. It’s got a 5 inch display, a QWERTY keyboard, the Debian Linux operating system that can handle desktop apps as well as games, and physical gaming buttons. It’s been under development for several years, and it’s expected to be available for purchase soon for about 500 Euros (plus VAT). But if you want to help fund the developers you can now place a pre-order for 330 Euros and up. Read more