Hi
I have a small problem in my code , I am currently using (SettingsTree) as sender of a SIGNAL(itemClicked(QTreeWidgetItem*,int), but I basically need the child (QTreeWidgetItem*) as the sender
May I know How can I go about it ?
{
root2->setText(0,"RESOURCES");
for(int i=0;i<1;i++)
{
child = createItem("eBeam Web Resources",root2,0);
child->setFlags(Qt::ItemIsSelectable);
}
while(*it)
{
if(test == "eBeam Web Resources")
{
connect(this,
SIGNAL(itemClicked
(QTreeWidgetItem*,
int)),
SLOT(openwebsite
()),Qt
::DirectConnection);
}
++it;
}
return child;
}
QTreeWidgetItem* SettingsTree::eBeamRESOURCETREE()
{
QTreeWidgetItem* child;
root2->setText(0,"RESOURCES");
for(int i=0;i<1;i++)
{
child = createItem("eBeam Web Resources",root2,0);
child->setFlags(Qt::ItemIsSelectable);
}
QTreeWidgetItemIterator it(child, QTreeWidgetItemIterator::Selectable);
while(*it)
{
QString test = (*it)->text(0);
if(test == "eBeam Web Resources")
{
connect(this,SIGNAL(itemClicked(QTreeWidgetItem*,int)),SLOT(openwebsite()),Qt::DirectConnection);
}
++it;
}
return child;
}
To copy to clipboard, switch view to plain text mode
Bookmarks