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

Quadcopter drone packs first all-Linux APM autopilot

Erle Robotics launched a ROS-enabled, open source “Erle-brain” autopilot that runs APM directly on Linux. The device also powers an “Erle-copter” drone. Over the last year, Spanish firm Erle Robotics S.L. has been working with 3DRobotics to develop an open source BeaglePilot autopilot for drones that can run Linux on 3DR’s popular, Arduino-based APM (ArduPilot Mega) platform. The APM Linux port was developed by both companies, as well as several academic institutions. The BeagleBone-based “Erle-brain” autopilot is built into the $490-and-up Erle-copter quadcopter. Read more

Seven Tips To Get The Most From Your New Android Smartphone

With applications able to run in the background and sync as they see fit, Android can rapidly eat through your cellular data allowance if you are not careful. While it’s fine to let the data run free on wi-fi, you’ll want to restrict your data usage when out and about. Short of switching off mobile data (which defeats the purpose of a smartphone), look under the options in the Data Usage part of the settings. Here you’ll find my wallet’s favourite Android setting of ‘restrict background data’. Now when using cellular data, apps will only pull down data when they are in the foreground and you can see them doing so. If a smartphone is all about being in control, this is the option that gives you confidence. Read more

today's leftovers

Hands-on with PCLinuxOS: A terrific release

I had been thinking that a new PCLinuxOS release was due any time now, based on their quarterly release schedule. Sure enough, it has now arrived, just in time for Christmas - PCLinuxOS 2014.12. Read more Also: Santa Claus has Linux in his sack -- PCLinuxOS 2014.12 is here PCLinuxOS 2014.12 released