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] Multiple QCombobox signal/slot connection
QtWS25 Last Chance

[SOLVED] Multiple QCombobox signal/slot connection

Scheduled Pinned Locked Moved General and Desktop
qcomboboxsignal & slot
3 Posts 2 Posters 2.1k 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.
  • N Offline
    N Offline
    navap
    wrote on last edited by navap
    #1

    Hi All!
    I have a QTableView with QComboboxes for each of column on its first row. I have registered currentIndexChanged() signal to its respective slots for each comboboxes. The number of comboboxes is dynamic. Is there any way to receive handle of the combobox that calls currentIndexChanged()?
    Thanks a lot in Advance!

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @navap said:

      Hi and welcome
      You can get the sender using QObject::sender() and cast it to a combobox.
      or use a SignalMapper
      http://doc.qt.io/qt-4.8/signalsandslots.html#advanced-signals-and-slots-usage

      1 Reply Last reply
      0
      • N Offline
        N Offline
        navap
        wrote on last edited by
        #3

        Thanks a lot mrjj!!!! This really worked for me!!!

        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