QTreeWidget Signal and slot
-
Hi... after populated my QTreeWidget
at the end, i write this:connect(ui->treeWidgetWiFis,SIGNAL(itemClicked(QTreeWidgetItem *,int)),this,SLOT(apri_connessione(QTreeWidgetItem*)));
and
void MainWindow::apri_connessione(QTreeWidgetItem *item) { qDebug()<<item; }
but i have error,
then i added in MainWindow.h, in private slot:void apri_connessione();
but not resolve.... this is the error...
error: out-of-line definition of 'apri_connessione' does not match any declaration in 'MainWindow'...Any help ?
Thank you...
Francesco -
How to fix ?
EDIT:
if in design make right click in QTreeWidget -> go to slot -> itemClicked()
not work!
with
error: ‘QTreeWidgetItem’ has not been declared
void on_treeWidgetWiFis_itemClicked(QTreeWidgetItem *item, int column);
^~~~~~~~~~~~~~~ -
@darkstaring said in QTreeWidget Signal and slot:
QTreeWidgetItem
include header
#include <QTreeWidgetItem>
-
@TobbY said in QTreeWidget Signal and slot:
#include <QTreeWidgetItem>
already included
EDIT:
but not in mainwindow.h....
thank you... now works