I was using Qt Designer to make a GUI for some role playing game database but there's something I couldn't figure out.
I wanted the list view widget to update the input widgets on the right hand side but even if I included all those input widgets in a groupbox they still ignore if I changed from one list item to another one and continue displaying the same information I entered while thinking it would be updated or repainted or anything else after I selected another list item.
What I wanted to do can be seen on this screenshot from an existing program coded in C++ w/o Qt.
[img width=400 height=368]http://img72.imageshack.us/img72/55/databaseh.png[/img]
This is what I did while trying to recreate that window using Qt.
[img width=346 height=400]http://img72.imageshack.us/img72/5026/database1.png[/img]
The connections or just their signals and slots didn't make it easy, I thought the slot should be something like update() or repaint() or maybe clear(), but none did the job and clear() wasn't even there.
So what should I do to make sure that every single list item will update or repaint or show new info on the right hand side if clicked on it? I chose itemSelectionChanged() or clicked(QModelIndex) or itemClicked(QListWidgetItem*) but once again nothing happened...
I wanted the list view widget to update the input widgets on the right hand side but even if I included all those input widgets in a groupbox they still ignore if I changed from one list item to another one and continue displaying the same information I entered while thinking it would be updated or repainted or anything else after I selected another list item.
What I wanted to do can be seen on this screenshot from an existing program coded in C++ w/o Qt.
[img width=400 height=368]http://img72.imageshack.us/img72/55/databaseh.png[/img]
This is what I did while trying to recreate that window using Qt.
[img width=346 height=400]http://img72.imageshack.us/img72/5026/database1.png[/img]
The connections or just their signals and slots didn't make it easy, I thought the slot should be something like update() or repaint() or maybe clear(), but none did the job and clear() wasn't even there.
So what should I do to make sure that every single list item will update or repaint or show new info on the right hand side if clicked on it? I chose itemSelectionChanged() or clicked(QModelIndex) or itemClicked(QListWidgetItem*) but once again nothing happened...
Comment