Trying to program a text editor with Qt