Important: Please read the Qt Code of Conduct -

[Solved]Adding a QTreeWidget to a new Tab from a QTabWidget

  • Hi,
    my problem is that i create a QTreeWidget from a file in read in, in a thread.
    When the thread has created the treewidget he send it back to the main thread.

    Now i want to add a new tab to my Tabwidget and set the treewidget as the shown widget in this tab.
    but i get this error: No matching function for call to 'QTabWidget::addTab(QTreeWidget&)'
    my code looks like this:
    @void Dictionary::addToTab(QTreeWidget *tree)

    Earlier I didi the same thing with a QTableWidget, where I read in a file in a thread and give the complete table back to the the main thread and it worked fine when i added the widget to the tab.

  • Ok,

Log in to reply