Is this the proper way of adding a line edit in a widget?
Qt Code:
  1. QLineEdit *lineEdit = new QLineEdit;
  2. layout->addWidget(linEdit);
To copy to clipboard, switch view to plain text mode 

I'm a total qt newbie and finding it hard to understand the documentation

I'm using sublime text as my text editor and compiling and running the program using the terminal