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] SIGNAL SLOT passing variable

[SOLVED] SIGNAL SLOT passing variable

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 812 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    Hello... I want to pass two integers through signals and slots to the function, but it gives me error...

    Works
    @connect(ui->P1C1Client, SIGNAL(clicked()), this, SLOT(test(int,int)));@

    Does not work
    @connect(ui->P1C1Client, SIGNAL(clicked()), this, SLOT(test(1, 3)));@

    How it should look:
    @connect(ui->P1C1Client, SIGNAL(clicked()), this, SLOT(test(1, 3)));
    connect(ui->P1C1Client, SIGNAL(clicked()), this, SLOT(test(1, 5)));
    connect(ui->P1C1Client, SIGNAL(clicked()), this, SLOT(test(1, 7)));
    //75x
    @

    I will have like 75 buttons and each button must pass specific numbers, so other functions know what to do... Since "easy" way does not work, could someone tell me how to achieve same thing without having thousands of functions...

    1 Reply Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #2

      Never mind... Found answer "here":http://qt-project.org/forums/viewthread/3715

      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