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

Collaboration Events: Pakistan Open Source Summit, GNOME+Rust Hackfest, DataworksSummit Berlin

  • Pakistan Open Source Summit 2018 concludes [Ed: Not about software]
    A large number of attendees from industry, academia, government, and students participated in the summit. Portuguese Ambassador to Pakistan Dr Joao Sabido Costa was the chief guest at the opening ceremony while former Naval Chief Admiral (r) Asif Sandila graced the occasion as the chief guest at the closing ceremony.
  • ‘Open Summit key to create industry-academy linkages’
    Ambassador of Portugal to Pakistan Dr Joao Sabido Costa has said that events such as the Open Source Summit are excellent for spreading awareness and for creating industry-academia linkages and enhancement of the information technology. He stated this while addressing a concluding ceremony of the two-day informative ‘Pakistan Open Source Summit 2018’ attended by large number of people from industry, academia, government and students. Former naval chief Admiral (R) Asif Sandila co-chaired the concluding session. Dr Joao Sabido Costa said that the organisations should utilise open source platforms to build their IT infrastructures in future. To build open source culture in Pakistan, he recommended roadmap with future activities and timelines for spreading open source.
  • Madrid GNOME+Rust Hackfest, part 2
    Yesterday we went to the Madrid Rust Meetup, a regular meeting of rustaceans here. Martin talked about WebRender; I talked about refactoring C to port it to Rust, and then Alex talked about Rust's plans for 2018. Fun times.
  • DataworksSummit Berlin - Wednesday morning
    Data strategy - cloud strategy - business strategy: Aligning the three was one of the main themes (initially put forward in his opening keynote by CTO of Hortonworks Scott Gnau) thoughout this weeks Dataworks Summit Berlin kindly organised and hosted by Hortonworks. The event was attended by over 1000 attendees joining from 51 countries. The inspiration hat was put forward in the first keynote by Scott was to take a closer look at the data lifecycle - including the fact that a lot of data is being created (and made available) outside the control of those using it: Smart farming users are using a combination of weather data, information on soil conditions gathered through sensors out in the field in order to inform daily decisions. Manufacturing is moving towards closer monitoring of production lines to spot inefficiencies. Cities are starting to deploy systems that allow for better integration of public services. UX is being optimized through extensive automation.

Today in Techrights

today's howtos

10 Great Linux GTK Themes For 2018

Customization is a big part of the Linux experience, and your desktop theme is no exception. The world of Linux desktop themes is an ever-evolving one, with new ones replacing old favorites all the time. Of course, the desktop environments and GTK itself are always changing, so that adds another dynamic element to consider. That said, some of the best desktop customization happens on the simplest desktop environments, like XFCE. As of now, in early 2018, there are some really excellent GTK themes available. These themes aren’t ranked in any particular order. That comes down to a matter or preference. Any one of them can add a whole new look to your GTK-based desktop. Read more