In most cases you could do something like this

Qt Code:
  1. FindDialog *dialog = new FindDialog(this);
To copy to clipboard, switch view to plain text mode 

I.e. in most cases when you create a dialog you are inside the code of a widget.

Cheers,
_