Qt Apps look like crap in elementaryOS

I’m running the beta1 of elementaryOS (http://elementaryos.org), so far I’m loving it! 😀 but, as you might know, I use Qt4 for my developments and I happen to like a lot of apps written with this framework, the problem is that eOS doesn’t have the qt4lib installed by default and when you install it and run any Qt app it looks like total crap. Like going back to Gnome 1.0. And you can get an error saying that “QGtkStyle was unable to detect the current GTK+ theme”.

You can solve this with this following command:

gconftool-2 --set --type string /desktop/gnome/interface/gtk_theme elementary

Yay! Now you can enjoy your Qt Apps in eOS 🙂

Que hacer cuando tenés muchas tabs… (o QTabWidget vs. QStackedWidget)

Agregando funcionalidad a QtQR, me encontré con este problema. Resulta que son tantas las plantillas para generar códigos QR que me quedó chico el QTabWidget.. quedan tantas tabs que pierde todo el sentido de funcionalidad; hay que desplazarse para ver las otras plantillas disponibles y sinceramente no me gusta como queda, veanlo por ustedes mismos:

Así estaba la interfaz previo agregar las nuevas plantillas:

QtQR 1.2 Screenshot
QtQR 1.2 Screenshot

Sigue leyendo

Introducing QtQR: a QR Code generator and decoder.

DISCLAIMER: Este post va en Inglés.. pronto lo paso al español.. Sepan disculpar.

What is QtQR?

QtQR is an graphical application for creating QR Codes easily; It also let’s you decode a QR Code stored on an image file or scan a printed one with your webcam.

…a QR what?

I don’t know, ask the japanese guys.. all I can say is that a QR Code is a two-dimensional barcode that looks something like the image below. According to the Wikipedia:

QtQR logo

QR Code used as logo for QtQR

“A QR code (short for Quick Response) is a specific matrix barcode (or two-dimensional code), readable by dedicated QR barcode readers and camera phones. The code consists of black modules arranged in a square pattern on a white background. The information encoded can be text, URL or other data.
Common in Japan, where it was created by Toyota subsidiary Denso-Wave in 1994, the QR code is one of the most popular types of two-dimensional barcodes. QR is the abbreviation for Quick Response, as the creator intended the code to allow its contents to be decoded at high speed[…]”

That’s for the formal definition, basically the QR Codes are useful for sharing a lot of information with a simple scan. They are used by the marketing guys for example in publicity. You can put an url, all your contact info, a predifined e-mail message, a sms message, a telephone number and anything you can think of on a QR code and anyone with a modern phone (not necessary a smartphone) can scan the code with the phone’s camera and decode all the data.

Say you want to make a personal presentation card with your contact information like your name, address, e-mail and phone number. You can put all that into a QR code, print it in the back of the card and instead of copying by hand your number a client can scan the code with his phone. 🙂 are you starting to like them?

There are several alternatives for creating a QR Code: websites, smartphone applications and there is even a command line application for Linux called qrencode. QtQR is a GUI front end for the latter made in Python and PyQt4.

QtQR 1.0

QtQR started as a simple wrapper for the command line program qrenconde inspired by a blog post. You can still download it from the google code page. Then I added the decoding feature using zbar; you can see how it worked in the following screencast:

At the same time David Green started to work on a GTK based GUI, so we got in contact and joined forces. From this the QR Tools project was borned; QR Tools project formed by:

  • python-qrtools: a library for creating and decoding QR Codes.
  • QtQR: a Qt4 based GUI.
  • QR Code Creator: a GTK based GUI.
In python-qrtools we work together with David making the core functions that I use in QtQR; you can even download the library and use it in your own projects to create or decode QR Codes.

The next step was to add templates for encoding text, urls, email address, sms and telephone numbers; setting qrenconde parameters and the capability to decode using a webcam. This realease was called QtQR 1.0. You can see a screenshot below.

QtQR 1.0 Screenshot
QtQR 1.0 Screenshot

at that moment QtQR was covered by OMG! Ubuntu! and got a lot of interest from the community. Right now we are working on the 1.2 version of QtQR, fixing bugs and adding features.

Sigue leyendo