thank you i changed it to
SSH_list_item* list_item = new SSH_list_item(name, mountpoint, address, this);
ui->SSH_List->addItem(item);
ui->SSH_List->setItemWidget(item, list_item);
list_item->show();
}
void sshfsGUI::create_new_entry(QString name,QString mountpoint ,QString address){
SSH_list_item* list_item = new SSH_list_item(name, mountpoint, address, this);
QListWidgetItem* item = new QListWidgetItem(name);
ui->SSH_List->addItem(item);
ui->SSH_List->setItemWidget(item, list_item);
list_item->show();
}
To copy to clipboard, switch view to plain text mode
now there is only the string list. the seperate windows do not appear anymore
edit: ok the mistake is in the order. i have to show the widget before adding it, like this:
SSH_list_item* list_item = new SSH_list_item(name, mountpoint, address, this);
list_item->show();
ui->SSH_List->addItem(item);
ui->SSH_List->setItemWidget(item, list_item);
}
void sshfsGUI::create_new_entry(QString name,QString mountpoint ,QString address){
SSH_list_item* list_item = new SSH_list_item(name, mountpoint, address, this);
QListWidgetItem* item = new QListWidgetItem(name);
list_item->show();
ui->SSH_List->addItem(item);
ui->SSH_List->setItemWidget(item, list_item);
}
To copy to clipboard, switch view to plain text mode
but there are new issues: only the widget of the last SSH_list_item added is visible and the name of it appears to times. and when i change the size og the main widget, the SSH_list_item widget disappears and again all i see is the string list.
sycreenshot: http://imageshack.us/photo/my-images...enshotpso.png/
Bookmarks