Sunday, February 10, 2019

Notes about this blog

Hello! 

As any reader will soon realize, I'm not working on this blog anymore. 

Qt played a big part in my development as a software programmer and was very useful in producing many tools for me and my employers. I'm very grateful for all the people who worked in developing it and I still and probably always will recommend it. 

Recently, though, I practically stopped using it since I started to focus more on developing applications for personal trading in stock market exchanges using MetaTrader 5 and its MQL5 language. Mostly thanks to that, I stopped learning the kind of content that was supposed to be published on this blog, thus ending the means to start working on this project. 

Since I don't plan to write here anymore, I'll publish the unfinished posts as they are. I hope it will help other Qt developers in the world in their works!


May the Lord be with you, always.

Profiling tools for Qt

Hello!

Here is a list of useful links about profiling and profiling tools for Qt.



May the Lord be with you, always.

Static: Articles about general programming

This static page contains a list of articles related to general programming.

General

Collections of articles about various issues or articles about general themes

Testing

Saturday, June 13, 2015

Static: General useful websites

This static page contains a list with useful websites of general content related to programming (that is: not necessarily related to Qt).


Test





Saturday, April 25, 2015

How-To: Create MySQL drivers in Qt for Windows


Hello! 


When installed, Qt lacks support for a series of SQL drivers such as that of MySQL, requiring the user to build them as he sees fit. This wouldn't be a major problem if there were easy-to-find manuals on the web or if Qt's own installation guide was clearer for starters - I remember it took something like 2 days for me to finally find the first working instructions when I first faced this problem (it was in Modh Amree's website which is now gone).

Regarding the not-so-much-new Qt 5, I found a clear instruction guide on Seppe Magiels' page (Create MySQL driver for Qt5 on Windows) which, as far as I can tell, is a correct (and clear) guide for doing this. The only significant difference between this guide and that of Amree's is that one step is lacking (probably due to changes in the Qt version) which is to repeat items 3 and 4 of the Step 4, but with "CONFIG+=release" appended to the call to qmake.


May the Lord be with you, always.

Thursday, March 5, 2015

Tips for fast C++ code

Hello!

I recently found an interesting article on Daniweb by a guy named Mikael Persson where he tells some interesting tricks about getting a higher-performance code. Here is the link. Although some of his solutions are quite code-dependent (that is, they depend to much in what specific code are you working with), the general principles and some tricks are still nice to know.


May the Lord be with you, always.

Thursday, August 28, 2014

New programming jargons

Hello there!

This is my first post that is of the "off-topic" class: although still talking about programming, it's not directed to Qt or C++ programming specifically.

Some time ago I was doing some research on the web and ended up finding this most interesting post in another blog called "New Programming Jargon".

It talks about a thread of Stack Overflow that was directed for people to talk about new programming jargon they have created and that were nice enough to be shared among the community - and actually most of them are pretty good!

So, have a look at it and lets code no "Yoda Conditions" anymore!


God bless you!

Have a nice day!

Sunday, July 20, 2014

Logging classes and libraries for Qt

V1.3
Hello!

Recently I had to do a research on logging systems for Qt-based applications and I found out that, while there is no system in Qt itself for such work (no "QLogger" class), there are a variety of works of the genre freely available on the web. Here is a list with the ones I found and some commentaries.


Logging mechanisms

Logger

Link: Gitorious repository
References: Ref 1
  • Thread safe
  • No "fixed size" log file system
  • Qt5 supported

QxtLogger

Link:
Help files: QxtLogger Class Reference
References: Ref 1
  • Thread safe
  • No "fixed size" log file system

QsLog

Link: Bitbucket link
Help files: QxtLogger Class Reference
References: Ref 1 Ref 2 Ref 3
  • Log level configuration for the entire log¹

QLogger

Link: Github repository
References: Ref 1
  • Log level configuration for each file one wants to print¹
  • LGPL license

QLogger

Link: Google repository
  • GPL license
  • Qt4-based

QLogger (QtPlayground)

Link: QtPlayground repository
  • Characteristics not yet verified.


Qtilities Log System

References: Ref 1
  • Characteristics not yet verified.

QtPlayground/QLogger

Link: Gitorious repository
  • Characteristics not yet verified.

Log4Qt

Link: Sourceforge repository
  • Quite a big library¹
  • APACHE license

Qt Logger

Link: Gitorious repository
  • Characteristics not yet verified.

Logger

Link: Download link and reference
  • Characteristics not yet verified.

mLogger

Now this is my own logging class! Unfortunately it's not yet public available, but the following list shows its features or planned features:
  • Usable for log into a file and for debug in Qt Creator's console at the same time
  • Fixed-size log file system
  • Thread safe
  • Debug with file + method + line information


Others

I also found some interesting links telling a little about logging mechanisms (not necessarely for C++). I guess they may be usefull if, despite the considerable number of logging classes or libraries for Qt shown above, one still wants to develop a logging mechanism of his own:


God bless you!
Have a nice day!


A nice FAQ about C++

Hello!

I recently found an interesting FAQ page about C++ with interesting information about some commons doubts about C++. Here is the link.


God bless you!
Have a nice day!

Friday, June 20, 2014

Tips and Tricks: Configuration depending on the compilation type when using qmake

Hello!

One of the things almost all projects that use Qt with qmake will end up having is alterations to the .pro file. Depending on the necessities of the project, many of these alterations will have to be different depending on wheter the user is doing a debug or a release compilation. Lets have a look into this.

Default: Scopes

If one have a look in the Qt Assistant files, this "configuration given a certain kind of compilation" should be done by scopes. The "scope mechanism" consists of declaring which king of compilation you're talking about (either "release" or "debug") together with the configuration data inside a group created with the {} symbols. Example:

release {
    LIBS += ...
    }

debug {
    LIBS += ...
    }

A better way

Theorically the scopes method works fine and it should do the trick. The problem, though, is that, by default, a project created in Qt Creator with qmake comes with some configurations to qmake that usually includes both release and debug situations. In other words, normally the scopes mechanism will fail. 

This problem have two known solutions: either you change the default configurations or you change the method used for specific configuration in the .pro file. The last option (that, at the end, should be used either way) consists of using the CONFIG directive in the .pro file this way:

CONFIG(debug, debug|release) {
    LIBS += ...
    }

CONFIG(release, debug|release) {
    LIBS += ...
    }

In the first code, the configuration is related to the debug compilation; in the second, is related to a release compilation. Put your code inside and everything will work without having to worry about the default configurations.

Conclusion

In this small article we saw a better way of writting configuration parameters in the .pro file of one's project using the CONFIG qmake directive instead of the default "scopes method"; an alternative that should be preferred to avoid having to unnecessarily change qmake's default configurations when a new project is created.

God bless you! Have a nice day!

References