Go’s defer statement in C++

The Go language provides a useful defer statement to guarantee certain code is always executed when returning from the current scope. Though we can use constructor in C++, things get tricky e.g. when a pointer needs to be deleted. Here we present some simple draft code to solve this issue.

[Read More]
go 

D-Pointer / Private Implementation in Qt

I believe many of you who just start reading the source code of Qt will have the question: why Qt uses those private classes? What’s the benefit of such a design pattern? Well, the most significant reason is to keep the binary compatibility.

[Read More]
qt 

Hybrid Application Using QML and Qt C++

Though QML provides a nice way to design user interfaces, and JavaScript is employed there to implement the application logic and works pretty nice in many cases, we might still need Qt C++ in some situations (well, at least JavaScript has limited access outside its sandbox).

[Read More]
qt