Hi. I have made a simple testing program which I'll use in another program later. I create the items of the QListWidget through looping and now I want to make changes in one of the items of the list, which the user clicks. But when I call a fucntion to edit the item, i recieve errors. How can i edit an item of the QListWidget?
OK. If i want to change the text of that QListWidget and other stuff while moving through the list like we do in arrays, what do i do? And if i want to edit 5 element of a QListWidget how can i move through the list? any easy way to move through the list like we do in arrays or linkedlists(of simple C++)
I think the second error says the functions is constant so i can't modify it. But i have to modify it. any way to do it.
No, the problem is that you're doing item->itemFromIndex(&a) when you should do item->itemFromIndex(a) .
Actually, I think that you will get another error when you fix this, since QListWidget::itemFromIndex is a protected function. If you want to want to get all the items in a QListWidget you can just do:
Basically I am making a software in which user enter the name of the product provides a little description about that and then other users comment on that product. Similarly one can add comments and products in the program.
How can copy the the text from the QListWidget item and Label and save that into a file?
How can i provide a little close button (as it is on the label in Qt file explorer)?
What can I do so that Every time the program starts, it loads the pics of the products with it?
I have made a little program and I want to add a pushbutton in the QListWidget item. Now the problem is:
1)I cant set the parent of this close button to be that specific Item in the List, so that when the user presses it, only this item is removed from the list.
2) How can I delete the item on which the button is pressed?