Results 1 to 4 of 4

Thread: prob on connect

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Join Date
    Jan 2006
    Posts
    667
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    10
    Thanked 80 Times in 74 Posts

    Default Re: prob on connect

    Either you will need to subclass QPushButton and reimplement keyEvents and mouseEvents.

    Or you will need to have separate slots for each button like this.

    Qt Code:
    1. vector <QPushButton*> pb;
    2. pb.push_back(pushButton0);
    3. pb.push_back(pushButton1);
    4. ..........................
    5. connect(pushButton0, SIGNAL(clicked()), this, SLOT(butto0Slot()));
    6. connect(pushButton1, SIGNAL(clicked()), this, SLOT(butto1Slot()));
    To copy to clipboard, switch view to plain text mode 

  2. The following user says thank you to munna for this useful post:

    mickey (4th July 2006)

Similar Threads

  1. many connect
    By mickey in forum Qt Programming
    Replies: 3
    Last Post: 29th May 2006, 12:55
  2. connect on a popup
    By mickey in forum Qt Programming
    Replies: 2
    Last Post: 12th April 2006, 16:37
  3. connect to sql server
    By raphaelf in forum Qt Programming
    Replies: 15
    Last Post: 27th February 2006, 18:06
  4. connect
    By mickey in forum Newbie
    Replies: 1
    Last Post: 25th February 2006, 18:31

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.