Sunday, March 17, 2013


Good morning!  I have finally written and released my first paid-application!  It's called UnitCircleQuiz and I wrote it to help people memorize the unit circle.  It displays all of the angles in Radians and their corresponding coordinates within the unit circle.  The timer at the top records how long it takes you to complete the unit circle and the progress bar along the bottom shows you how far through the round you are.  Once completed, a high score list is shown with your best scores (percentage correct) and best times.

You can find it here:

For the technically inclined:  I wrote this app using QML and Qt C++, which was a pretty amazing experience!  I could easily and instantly test out any screen resolution and aspect ration by debugging the QML UI file as a native application on my computer.  If you're looking for a language to develop Android apps in, seriously consider QML and C++!

Thanks for stopping by!

Chris Konstad

Get it on Google Play


  1. Looks very cool. I've been playing around with QML and C++ as well. One thing though--how exactly did you deploy the necessitas app to Google Play (or an android device for that matter)? That is, signing it, building the .apk with Necessitas, etc.

    1. Thanks! I use the Necessitas Qt Creator on Linux (due to an unarchiving error on OSX with the latest version) just as I would the "stock" Qt Creator for desktop apps, except I select Android as my target environment. The Necessitas Qt Creator has an option under the kits section that lets me automatically sign my apps using a keystore that I generated earlier (if you. The .apk gets built when you click the run button (NOT the build button), and it is signed using the release key only when packaging the release build (debug builds have their own key, IIRC). The packaged and signed apk appears in applicationDirectory/android/bin.

      If you'd like, I can make a short Youtube tutorial that covers the whole process. Just let me know if you'd like that!



    2. Oh yeah, I found those settings but I was having trouble with the keystore file being selected. Do you use a special tool for the Necessitas signing? I was using the command line tool in the SDK. If anything, a quick YouTube tutorial would be good for everyone else, not just me :)

      And yeah, I was using release mode, but thanks for the detail about the .apk only being built on run, as I didn't have my device connected while trying to build and couldn't figure it out!

      In fact I looked a week or two ago for a follow up on your Necessitas tutorials :P

    3. Hmm... That's weird. Nope. I just created a keystore using the command line application that comes with the Android SDK (Keytool, I believe) and used that to sign my apps. Okay. I'm pretty busy right now with college and robotics team stuff (going to open houses, building an ROV, etc.), but I should be able to get to making a short tutorial soon.

      You're welcome. That process confused me a lot at first. I'm actually pretty curious as to why it doesn't package the apk during the build process...

      Haha! Well then I guess I'll have to make some more, then. I need to find a good screen recorder for Ubuntu since I can't get the latest version of Necessitas to install on OSX.

    4. Yeah, I'm pretty busy too with regular C++ coding for other organizations. Just looking to try with Android (been meaning to learn QML anyway... I haven't used it on the desktop yet).

      As for a good screen recorder, both gtkRecordMyDesktop and Kazam are good. I personally use Kazam but I have a pretty decent CPU that can re-encode the video afterwards (likewise, if you have fast internet or a lot of time/bandwidth you can just upload the full quality video). If you do go with the first of the two, I would try to splice the audio later instead of trying to configure it to record (it can be a mess and out of sync, etc.)

      If you are looking for a "quick and dirty" solution, I think you can use ffmpeg to grab the audio and video using a Terminal command or two. I haven't been on Linux for a while though since I've kind of been working with Visual Studio lately and Team foundation. Got to love all the proprietary stuff coming from Linux :/

    5. Oh okay. You really should check out QML. It's awesome! On a side note, I recently learned that I can get pointers to QML items and set/read properties straight from C++ using pointers. That was a life saver!

      Thanks for the info. I'll take a look at them! I usually just do a voice over after the fact. I "uh" and "um" too much otherwise. :O

      Gah. I love Windows for gaming, but I hate it for programming. Programming on Windows just doesn't feel right to me, but I guess I've just gotten used to the *nix environment (although I grew up in a Windows household). Sourcetree finally being ported to Windows helps, I guess. Windows needed a good Git client! I just hope it gets ported to Linux now. It's by far my favorite Git GUI.

  2. Haha, I use Source Tree. After I got Visual Studio and learned the ins-and-outs... ehh... well, the command line workflow in Linux has it's benefits in some places. :P Oddly enough, most programmers I know use Mac.

    And you can hook up QML and C++ that easy :O Wow, I heard that hooking up the C++ meant making like a plugin and loading it at run-time, etc. etc. Guess things have changed (for the better!).

    I think I'll try a QML desktop app after I finish my latest application for someone. Hopefully I can share some Qt knowledge on my new blog. Most of the time I work on internal projects and it can be hard to share ANYTHING that I do just because of the things I sign :P Really I'm kind of a noob at Qt anyway... Well, started a few months ago.

    I've spent a lot of my time working on some engines (what else do people want C++ for anymore.. :( so sad). So far I absolutely love Qt though. I originally got exposed to Qt by a friend when I complained about MFC (quite frequently believe it or not). Can't wait to sub-class UI components and figure out Qt's MVC, as I heard it's really good.

    1. Yeah. GUIs are nice, but I love my command line. At least there's Cygwin. Really? That's interesting. I use it for working on my resources and maybe half of my programming. I switch back and forth between Linux and OSX.

      Yes! You can. I plan on writing some QML tutorials soon, especially over summer vacation. I've heard of that way, but I've NEVER done it that way. I always just expose a C++ class to the QML through contexts or I just use pointers from the root object.

      QML is really fun and very quick for developing interesting UIs. I can't wait to do some QtQuick2 stuff! I'm just waiting for it to be released for Android.

      I love Qt as well! It's an amazing framework. I think you'll like it. It's incredibly easy to use and the APIs are really clean.

    2. Oh yes, command line are wonderful... if you are on *nix. I tried Cygwin and it worked... somewhat. Every feature I wanted that CMD didn't have already seemed to be missing. Terminal is one of a kind.

      As for the QML, I played around with it and got some really nice results for just an hour or two. For inspiration I looked at iOS and QML made so much more sense when it comes to making those kind of UIs. You can just plan it out in your head unlike QWidgets (never even bothered to look beyond the OS for inspiration there :P).

      I'd love to see some QML + C++ tutorials! QML is really easy to learn (first day and I pretty much had it down), especially if you are familiar with Web UI programming (CSS, Javascript, etc.). One thing I'd really think beneficial for you to cover is using C++ models and QML views as that is probably the most logical reason for C++ anyway, is the back-end. As for the QML objects getting in, I successfully connected a MouseArea to a C++ slot that displayed a message box, so that was much easier than I thought :D

      Android is a really interesting platform. I can't wait to bring Qt Quick 2 to that either, as the added Seen Graph or whatever it's called is supposed to use native OpenGL and results in something like a 2x performance gain over Qt Quick 1(which is already pretty fast). The built-in components are supposed to be updated as well, I think.

      And yeah, I'm loving Qt. The API is really extensible as well, which I love and can't wait to exploit. If I had an Android device I'd buy your app to see what you did with QML and C++, but sadly I don't have one. I JUST watched your demo on YouTube though and it looks awesome!

      I downloaded a Qt Cinematic Experience example and my, QML looks really powerful, especially with the awesome features such as particles (I hear there is a 3D module as well). Also, the animations look so much easier than the QWidgets state machine and all that.

      Best of luck making awesome tutorials. Maybe I can put them up on my blog too. A lot of my readers seem to be interested in some more QML tutorials (I had originally planned on really low level stuff like the Windows taskbar with win32 calls, etc.).

    3. Thanks for the information! I'll definitely make some tutorials when I can get around to it. I'm pretty busy right now between college admittance stuff and work for my robotics team. But I plan on doing a TON of QML and C++ programming this summer vacation, including tutorial-writing.

      I can't wait for QtQuick 2 either. Those performance increases!!! O.o

      Have you seen the new optional style for the QWidget UI elements? I think it's called Fusion or something and it looks really, REALLY nice.

      Yup! You can definitely share any tutorials I write here or put on YouTube. After all, I want them to help others!