I have subclassed QLineEdit in order to handle a focus event, and I would like all existing text to be highlighted as soon as I click in the textbox. The selectAll() method does not work. What am I missing?
Qt Code:
// -------------------------------------------------------------------- { Q_OBJECT protected: }; this->selectAll(); // THIS DOESN'T WORK //this->clear(); // <-- THIS WORKS! }To copy to clipboard, switch view to plain text mode
Bookmarks