Qt Code:
  1. MainWindow::MainWindow() {
  2. createMenus();
  3. tabWidget = new QTabWidget;
  4. edit = new CodeEditor();
  5. //tabWidget->addTab(edit, "1");
  6. setCentralWidget(tabWidget);
  7. }
To copy to clipboard, switch view to plain text mode 
If I write "tabWidget->add", is OK, one tab.
If not, is empty editor. Its color is white, I prefer gray and don't know, I must change MainWindow background color or empty QTabWidget background color (which is central widget)