Results 1 to 4 of 4

Thread: little logical question........

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2007
    Posts
    42
    Thanks
    11
    Qt products
    Qt4
    Platforms
    Unix/X11

    Question little logical question........

    Hi

    i had connected about 15 QActions to a common SLOT, but i am not able to find in my slot function from which QAction the SIGNAL is coming . I had coded something like this

    Qt Code:
    1. for(int i=0; i<15; i++)
    2. {
    3. play_add_Act[i] = new QAction(this);
    4. play_add_Act[i]->setText("Play list");
    5. connect(play_add_Act[i], SIGNAL(triggered()), this, SLOT(addplaylist()));
    6. }
    To copy to clipboard, switch view to plain text mode 

    i also tried to pass index variable in slot function, but Wysota said that we shouldn't pass parameters names or values in SIGNAL or SLOT macros

    so how can i identify signal sender action??????
    Last edited by jpn; 12th May 2008 at 13:29. Reason: missing [code] tags

Similar Threads

  1. SQL Question
    By ^NyAw^ in forum Qt Programming
    Replies: 5
    Last Post: 8th April 2008, 19:36
  2. Replies: 1
    Last Post: 15th March 2007, 20:45
  3. Question regarding how to paint after zoom.
    By JonathanForQT4 in forum Qt Programming
    Replies: 2
    Last Post: 26th January 2007, 15:34
  4. QThread exit()/quit() question
    By TheKedge in forum Qt Programming
    Replies: 1
    Last Post: 28th August 2006, 14:38

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.