void Tree_Category::AppendItemTree()
{
if (Maus_Select_Active) { /* active QTreeWidgetItem */
/*int sotto_totale = Niagara_Actual->childCount();*/
/*niagara->editItem(Niagara_Actual,0);*/
/*qDebug() << "### found 0 " << sotto_totale;*/
bool ok;
if (ok && !SetNewName.isEmpty()) {
watposition++; /* numeration */
newsub->setText(0,xput);
newsub->setToolTip(0,xput);
PutOptionNow(newsub); /* set various option and put to other class qlist */
}
} else {
QMessageBox::warning( this, tr
( "Error" ), tr
( "Select on item please!"));
}
}
void Tree_Category::AppendItemTree()
{
if (Maus_Select_Active) { /* active QTreeWidgetItem */
/*int sotto_totale = Niagara_Actual->childCount();*/
/*niagara->editItem(Niagara_Actual,0);*/
/*qDebug() << "### found 0 " << sotto_totale;*/
bool ok;
QString SetNewName = QInputDialog::getText(this, tr("New Item append here"),tr("Name:"), QLineEdit::Normal,"", &ok);
if (ok && !SetNewName.isEmpty()) {
QTreeWidgetItem *newsub = new QTreeWidgetItem(Niagara_Actual);
watposition++; /* numeration */
QString xput = QString("[%1] %2").arg(QString::number(watposition),SetNewName);
newsub->setText(0,xput);
newsub->setToolTip(0,xput);
PutOptionNow(newsub); /* set various option and put to other class qlist */
}
} else {
QMessageBox::warning( this, tr( "Error" ), tr( "Select on item please!"));
}
}
To copy to clipboard, switch view to plain text mode
Bookmarks