Project: Sudoku

published on April 5, 2012

Technologies: 
C++
Qt
Time range: 
February 2008 to June 2008
As a: 
student

School year: second bachelor year, second & third term.

In the second bachelor year of Computer Science, Hasselt University has an interesting course, called “Trimester-crossing Project”. This is a chance to work on a bigger project early on in your CS education. I partnered with Bram Bonné again and chose to build an awesome Sudoku app. This project has been made available on GitHub.

Sudoku on OS X Sudoku on Linux Sudoku on Windows Sudoku generating a random sudoku Sudoku while paused

This application is written in C++/Qt 1, and attempts to do everything “right”, i.e. “the Qt way”. It has become a showcase application for Qt: Nokia has awarded the “Qt Ambassador” title to it — you can see it on qt.nokia.com. Features include:

  • cross-platform (it builds on all major platforms: Windows, Mac OS X and Linux)
  • multi-threaded (i.e. always responsive for the end user, even when a new sudoku is being generated))
  • fancy! (All dynamically generated, but based on a mock-up made by graphic designer Kaj Heijmans.)
  • translatable (it’s available in English, French and Dutch—the same language as the OS’ language is loaded automatically)
  • Doxygen documentation in all classes
  • show the validity and solvability of the current sudoku
  • provide hints for single cells in a sudoku
  • solve the entire sudoku
  • generate new sudokus at multiple difficulty levels
  • timer (which is automatically paused when the application loses focus)
  • open and save sudokus in its own custom format (which will remember your settings and timer)
  • import and export to .csv format
  • export to .png images
  • print sudokus
  • keyboard shortcuts for all functionality, but all functionality is also available via the mouse
  • fullscreen mode

Bram Bonné wrote the sudoku generation and solving algorithms (Sudoku.h) and the data structure it uses directly (Board.h). He also took care of the translations and finished off the reports, and tested the application on the Linux platform. I wrote everything else (most importantly all things Qt and the multi-threading adaptation of Bram’s sudoku algorithms), the testing on the Mac OS X and Windows platforms, and the build scripts for all platforms.


  1. Qt 4.3 back then — it has been made with the current stable version of Qt: Qt 4.7. ↩︎