PDA

View Full Version : How do I connect the list view and the input widgets?



kyonides
Apr 15th 2010, 05:37 AM
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.

http://img72.imageshack.us/img72/55/databaseh.png

This is what I did while trying to recreate that window using Qt.

http://img72.imageshack.us/img72/5026/database1.png

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...

kyonides
Apr 20th 2010, 08:32 PM
OK, since now I don't expect a single comment or suggestion or advice from you, I'll tell you what I did in the last few days. I used the Qt Ruby bindings and scripted the code for this gaming database. This is the most recent version of it, just take a look.

http://img263.imageshack.us/img263/218/databasefull2.png

http://img217.imageshack.us/img217/424/databasefull3.png