Posts Tagged c++
Compressing – Decompressing web GZIP stream
Posted by LuGru in Programing on 21/06/2010
Compressing and decompressing is one of the essential task when dealing with the web oriented programming. Qt allow to manipulate compressed data stream using qUncompress/qCompress functions, but they are problematic and don’t really helps much. From my experience, with these functions, it’s practically impossible to decompress gzip stream (although I can be wrong on this one, and maybe there is a way – never say never) . Read the rest of this entry »
QtThreads are not scary! – part 1 – How not to write It
Posted by LuGru in Programing on 16/05/2010
From my experience QThread class can be somewhat confusing to use. Mostly due to how they work, not because they are hard, so here is a short explanation what and how to use threads in qT.
In the first place why to use threads? Threads are useful for heavy duty or computation expensive tasks that cause GUI to freeze. In example video compression takes a long time and is very CPU intensive. If that task is run on the same thread as you main GUI, in main application thread, program don’t receive events and operating system mark it as non responsive. Of course, if application is well written, after video compression GUI “unfreeze” and program works fine after that. This behaviour is not expected, because user don’t rally know if program works correctly or not. Read the rest of this entry »
Static qT compilation and mingwm10.dll (MinGW) confusion.
Posted by LuGru in Programing on 20/04/2010
After some reading, on the web, about MinGW compiler It comes to my attention that using static qT build without mingwm10.dll could cause memory leeks. That’s due to specific job that mingwm10 perform, with is catch dying threads and clean up data after them and handle exception in code. This is probably the reason, why by default, MinGW links that library in the first place. Read the rest of this entry »
[qT] Remove items from model and list
Posted by LuGru in Programing on 16/04/2010
Removing items from views can be somewhat troublesome. Not because it is hard, but because the idea behind it is part of more wide subject, with is MVC (Model View Controller). It nutshell Model is something like database, that store all the information that can be later displayed by Views. View is visual representation of model, it can be i.e. ListView, TableView, or ListWidgetView and so on. Read the rest of this entry »
QtDesigner and qGLWidget
Posted by LuGru in Programing on 19/03/2009
Creating OpenGL application in Qt can be sometimes really painful. Especially when you need to design additional widgets into main form along with qGLWidget. Of course it all can be done by typing ‘by hand’ all positions, sizes and properties, but it takes a lot of time.
Qt offers a really handful application called qtDesigner. It’s additional module with support programmers in creating GUI. But it doesn’t offer qGLWidget, so basically you cant place it onto a form within Designer. Read the rest of this entry »