Skip to content

Zchydem's Blog

#Qt, #Linux, #Programming, #MeeGo…

Archive

Category: Programming

 

I thought, that it could be a good idea to write a short post how to port an existing Qt4 QML application to Qt5. At first, if you are not familiar how Qt will change for the next version, you should read this doc: The Road to Qt 5. The one of the biggest changes is happening under to hood of QML / QtDeclarative module.  As Lars Knoll, wrote in the document, there is a new scene graph, which will replace the old QGraphicsView/QPainter based implementation. So basically what this means is that the gap between QML and HW gets smaller. In other words, in Qt5 you will get a kick ass performance for your QML applications plus extra features like shaders. Yes, you can also use shaders in your QML code!

continue reading…

Looks like HTML5 is the next buzz technology that every software consultancy company is desperately trying add their competence list. For some reason, it’s something that is predicted and announced to be in the next generation mobile devices. For example Tizen is said to support HTML5 and Samsung Bada mobile OS’s SDK/IDE already provides project templates to create HTML5 mobile apps. In addition to all this, web is full of different frameworks, which provide ways to build HTML5 based applications. I think one of the biggest expectations is that HTML5 is the “real cross platform technology for mobile application development”. Unfortunaly, I disagree.

I’ve been playing with HTML5 for couple of weeks now and I thought that I should share my view of HTML5 based mobile application development. My background is on traditional software development, programming languages and toolkits such as C/C++, Qt, iOS/Objective C, Python and Java. There is also a good reason, why I have never been interested in web technologies and reason is I don’t like the way web sites are built. For example I think the mix of HTML, Javascript and PHP looks confusing and structuring the code is rarely looks nice.  Another a big obstacle for me is that, I don’t like Javascript. I think, it’s more like a “toy programming language” for kids when comparing it to C++, Objective C, Java and Python.

But as I said, I’m not a web developer. It might be that I just haven’t seen a well structured web site or my inner resistance is just too much to let me to learn these technologies well enough.

continue reading…

I like to distribute my QML application so that everything comes with a single binary executable. In practice this means that I have defined that all my QML files are compiled into binary using Qt’s resource compiler. Resource system in Qt is quite nice, but there is annoying bug in Qt creator. Sometimes it doesn’t recompile resources even though I have modified a QML file. This means that you need to select “Clean” and “Build” from Qt creator in order to get modifications compiled. This takes time.

Some time ago, I figured out a workaround for this. You can add a custom build step to your Qt Creator’s project. This build step modifies e.g. an image that is included the project and then resources are recompiled. Here’s a screenshot how you can do it.

Custom build step to make rcc run every time you compile.

I added the custom build step to the first (touch quickflickr.png) and when my project is being compiled it notices that some of the resources have changed and it runs resource compiler too. This is far from an elegant solution, but at least it works for me and I don’t need to run “Clean & Build” which takes for ever. At least, it feels so after you have recompiled your project for the 10th time.

UPDATE: I thought, that there would have been a bug about this but couldn’t find a onet from Qt’s issue tracker so I created a new one: QTCREATORBUG-5743.

I hope this trick will help some one else too. Thanks for reading my blog and thanks for Bale to encourage me to write this “tip of the day” post. Cheers!

My last post about iOS application development was based on my experiments of developing FoodGarden – a shopping list and recipe application. I will release FoodGarden via d-pointer in Apple’s AppStore, hopefully quite soon. This blog post is a short introduction for the application. Let’s watch the video first.

I wanted to keep the video short and present the most of the functionality what you can do with the app. I left the boring section out i.e. adding bunch of recipes, items and sections, which you can use when creating shopping lists and recipes.

I’ve been using FoodGarden as my shopping list application lately and it seems to work pretty well. At least I haven’t found any critical bugs or annoying features.

continue reading…

I’ve been a lazy blogger lately, but it doesn’t mean that I haven’t been doing anything. Actually, I’ve done quite a lot lately. I’ve started to educate myself to iOS development. Don’t get me wrong. I haven’t changed the camp from Qt development to the iOS development, but I think it’s just a sane move to do something completely different to keep mind open and to learn new things.

As I’ve mentioned in my earlier posts, I also own Mac and iPhone, so I thought that I should try code something for iPhone. This blog post is about my thoughts what it takes to start coding on iOS operating system and what it requires if you are coming from Qt world.

DISCLAIMER: This blog post might contain errors related to iOS and Objective-C because I’m really newbie in that area. Please feel free to comment if you notice any errors in the text.

The First Challenge – Objective-C

Actually the first challenge is that if you don’t own Mac, you need to buy a new computer first because iOS development can only be done on  Mac. If you happen to own Mac, then you just need to install XCode with iOS SDK which can be downloaded from http://developer.apple.com.

The real first challenge is the Objective-C programming language. I’ve coded only using C, C++, QML, Java, Python, but never using Objective-C. The syntax looks really weird like [myObject doesSomething: parameter1 andDoesSomethingMore: parameter2]. I am also lazy in a sense that, if I need to learn new things, I get bored quite fast if I can’t try things in practice soon. Instead of starting to read Objective C manuals from Apple site, I googled a bit and found this useful document: From C++ to Objective-C written by Pierre Chatelier. That piece of paper was really useful to get fast into a Objective-C world and to understand that weird syntax.

continue reading…