title: Simple text editor in Qt/C++
body: <p>I would like to write a simple text editor. I would like it to be GUI-based, and written using Qt.</p>
  
  <p>Qt provides the class <code>QTextEdit</code>, which is a pretty fully-featured text editor (it supports <code>ctrl+c</code>, <code>x</code> , and <code>z</code>, text highlighting, and moving the cursor around left-right-top-down). I would like to write something similar, but I would like to implement all this functionality from scratch.  </p>
  
  <p>So my requirements are: </p>
  
  <ul>
  <li>A simple window. </li>
  <li>Be able to read text from a user, and output the prepared file to the screen. </li>
  <li>The user must be able to access the text for editing.</li>
  </ul>
  
  <p>I have taken a look at the source code to <code>qtextedit.cpp</code> from the official Qt site to get some idea of how this was implemented. Unfortunately I am not experienced enough to understand it (there are nearly 4000 lines of code, and many macros).</p>
  
  <p>How might I make some progress with my project?</p>