I want to add a textedit widget to my window. It has a "QHBoxLayout" layout.
I'm tryin to add this textedit but I cannot. I think, it places the textedit under the treewidget.
I don't understand why.
Can u help me pls?
Here is my code:
Qt Code:
  1. glWidget = new GLWidget;
  2. tree = new QTreeWidget;
  3. tree->setHeaderLabel("Items");
  4. qtItem = new QTreeWidgetItem(tree);
  5. qtItem->setText(0, tr("QtLogo"));
  6. QWidget *tmpw = new QWidget();
  7. QTextEdit *cmd = new QTextEdit(tmpw);
  8. QHBoxLayout *mainLayout = new QHBoxLayout;
  9. mainLayout->addWidget(glWidget);
  10. mainLayout->addWidget(tree);
  11. mainLayout->addWidget(tmpw);
To copy to clipboard, switch view to plain text mode 

Edit: I'm sorry I posted it twice mistakely.