Game of life implementation in qt/c++