How i can emit a signal from this extendet class? on qt4
The q4 doc give a method to set a Qt::Unchecked but not a method to grab or emit
signal from Unchecked or checked.... one way road?


this compile ok but not work.. why?

/* Last item of tree !*/
class QTreeOne : public QObject, public QTreeWidgetItem
{
Q_OBJECT
public:
QTreeOne(QTreeWidgetItem* parent);
int db_id;
void Set_id( int num );
protected:
public:
public slots:
void Put_works();
signals:
void open_db_form(int db_id);
};

QTreeOne::QTreeOne(QTreeWidgetItem* parent) :
QTreeWidgetItem( parent )
{
this->setBackgroundColor(0,QColor(237,237, 237, 237));
this->setFlags(Qt::ItemIsUserCheckable);
this->setCheckState(0,Qt::Unchecked );
connect(this, SIGNAL(itemPressed(QTreeOne*,int)),this, SLOT(Put_works()));
}

void QTreeOne::Set_id( int num )
{
db_id = num;
}

void QTreeOne::Put_works()
{
if (db_id > 0) {
emit open_db_form(db_id);
}
}