Hello. I have a program which have Edit menu, where I have cut, copy and paste.
I tried to use these menus with the following:
Qt Code:
  1. ...
  2. connect(action_Copy,SIGNAL(triggered()),lineEdit_2,SLOT(copy()));
  3. connect(action_Copy,SIGNAL(triggered()),lineEdit_3,SLOT(copy()));
  4. ...
To copy to clipboard, switch view to plain text mode 
Now the copy menu works, but there is over one million connect there... How can I optimise this situation? I thinked about for cycle but I search other, better solution... Please help, thanks