title: Qt simple note pad, print line number on status bar of QmainWindow
body: <p>I have created simple notepad from Qt/C++. I want to print the line number on status bar of <code>QMainWindow</code> when I click somewhere on the text area, like notepad of Microsoft Windows</p>
  
  <p><img src="https://i.stack.imgur.com/kTX9V.jpg" alt="Status bar with line number"></p>