PDA

View Full Version : Set programmatically Focus on QGraphicsTextItem



EarthHobbit
22nd April 2015, 09:57
I am programmatically creating a QGraphicsTextItem in my cpp code (and add it to my QGraphicView), and would like this QGraphicsTextItem to immediately get focus so I can type on my keyboard.
Today I need to double click in it, how can I bypass this double click requirement ?
Thanks.

Added after 17 minutes:

Found it, textItem->setFocus()