Announcement

Collapse
No announcement yet.

How do I connect the list view and the input widgets?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How do I connect the list view and the input widgets?

    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...
    Multibooting: Kubuntu Noble 24.04
    Before: Jammy 22.04, Focal 20.04, Precise 12.04 Xenial 16.04 and Bionic 18.04
    Win XP, 7 & 10 sadly
    Using Linux since June, 2008

    #2
    Re: How do I connect the list view and the input widgets?

    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.

    [img width=400 height=312]http://img263.imageshack.us/img263/218/databasefull2.png[/img]

    [img width=400 height=307]http://img217.imageshack.us/img217/424/databasefull3.png[/img]
    Multibooting: Kubuntu Noble 24.04
    Before: Jammy 22.04, Focal 20.04, Precise 12.04 Xenial 16.04 and Bionic 18.04
    Win XP, 7 & 10 sadly
    Using Linux since June, 2008

    Comment

    Working...
    X