Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [SOLVED]QPushButton click signal with QStringListModel
QtWS25 Last Chance

[SOLVED]QPushButton click signal with QStringListModel

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 916 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    republicca
    wrote on last edited by
    #1

    Hi!

    I'm trying to create sth like in the picture:

    !http://oi61.tinypic.com/8xn3p5.jpg()!

    The boxes are ListViews and the buttons QPushButtons

    Right now I have a QStringListModel that allows me to create the different buttons with their texts, and automatically adds the scroll bar to the listview. the problem I have with this, is that i don't now how to enable/disble the different buttons of the right box when one or another buttons is clicked.

    I have tried to add the buttons to a qbuttongroup but they stop showing.

    Maybe i'm not using the irght model or sth but i'm really stuck and would appreciate any help.
    Thank you in advance!

    1 Reply Last reply
    0
    • R Offline
      R Offline
      republicca
      wrote on last edited by
      #2

      I think I found the answer. When I create my buttons I add them to a group, and the with the buttonClick(QAbstractButton *) signal I get that there was a button clciked and im allowed to enable buttons from other listviews based on their ids

      If I change anything ill post it here :-)

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi and welcome to devnet,

        Nice you found a solution and thanks for sharing.

        Can you also please update your thread title prepending [solved] so other forum users may know a solution has been found :)

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved