I was looking for a good free framework for C++ GUI and, oh boy, it was hard to find one to satisfy my needs.
Basically, what I needed was 2 main things:
- free for commercial use(i.e. MIT License)
- drag and drop for UI elements
Of course, I did not find anything that meets both expectations. There is QT, for example, which has everything I need but the problem is that it does not have a free License that allows commercial use. Almost all of these frameworks have a paid license which was not going to cut it.
Why not pay?
You may ask yourself, why I don’t want to pay for the framework if I want to monetize my application. Well, there are some points that I took into account before taking this decision.
First, the application that I want to create has arguably low chances to succeed, since there are a lot of other apps that do the same thing. This is as much an attempt to monetize as it is an attempt to learn something new.
Second, I don’t have the time necessary to work full time on the application since I have a full time job. That means that buying a commercial license for a framework like QT for one year might not be enough to finish the application.
Paying at least 3.6k $(maybe double) for a product that might not even make money at all just wasn’t something that I am willing to do.
After having no luck at finding the perfect framework with the 2 above expectations, I really thought that there is no such thing for C++.
And I was right.
I didn’t manage to find a GUI framework for C++ that has both a free license and drag and drop for UI elements.
However, after this, I discussed with a friend about this subject. Thanks to him, after providing many alternatives for me, he also mentioned NAppGUI.
He didn’t have the time to try the framework by himself, but said that it looks promising and I should try it out. And he was right!
I tried the framework up and, oh boy, am I happy. The framework is actually implemented for C but it’s perfect for C++ as well.
In fact, I was so happy with the functionalities of the framework that I decided to write this article! The man that implemented this really deserves some recognition.
Let me list some advantages of the framework that caught my eye.
- free (MIT license)
- cross platform
- well written documentation
- examples and demos
- easy to use and intuitive
- compatible with both C and C++
- build system with CMake
So, these are some advantages that made me like this framework so much that I wanted to give some recognition.
Aside from all of the above, of course there are some disadvantages to the framework also(e.g. the API seems to be a little bit verbose) but on average, I feel like, as my friend also said, it seems to be very promising.
If you are like me and need a free framework for C/C++ GUI, go and check it out on their official site at NAppGUI.
Let me know what you think in the comments below. I’m going to continue with my application using NAppGUI for now!