i want to define bunch of connections. If i wrote like this, can it work?
for(int i = 0; i<10; i++)
connect( pb[i],SIGNAL(clicked ( ) ),this,SLOT ( pbpushed ( ) ) ) ;
i want to define bunch of connections. If i wrote like this, can it work?
for(int i = 0; i<10; i++)
connect( pb[i],SIGNAL(clicked ( ) ),this,SLOT ( pbpushed ( ) ) ) ;
Yes, it will work.
If pb[i] is not a pointer then use
Qt Code:
connect(&pb[i],SIGNAL(clicked ( ) ),this,SLOT ( pbpushed ( ) ) ) ;To copy to clipboard, switch view to plain text mode
Mithin
www.mithin.in
Bookmarks