Sir,
I have a textedit which is the child widget of another parent. I have implemented the mouseDoubleClickEvent on the text edit and my requirement is that when I doubleclick on a line, I should get that entire line. Here is a part of my code:
Qt Code:
  1. if( e->type() == QEvent::MouseButtonDblClick ) // Mouse Double clicked
  2. {
  3. int *para1,*para2,*index1,*index2;
  4. if( te->hasSelectedText() )
  5. {
  6. system("echo mouse clicked");
  7. te->getSelection(para1,index1,para2,index2,0);
  8. }
  9.  
  10. QString line=te->text(*para1);
  11. // print line in another widget for testing purpose
  12. //call to another function
  13. return true;
  14. }
To copy to clipboard, switch view to plain text mode 
Now, when I doubleclick the mouse, I could not see the output on console. And when I remove the if -condition inside, I could see the output on console.But the program is exiting itself by reporting "Bus error" on the console. Kindly help me in solving this problem.
Thanks and regards,
Sarma.