Check out these functions from QWidget class.
Qt Code:
Qt::FocusPolicy focusPolicy () const void setFocusPolicy ( Qt::FocusPolicy policy )To copy to clipboard, switch view to plain text mode
Because by default a widget has Qt::NoFocus flag set.
Bookmarks