Qt GUI making operations on matrices (from university era)