Results 1 to 1 of 1

Thread: Set programmatically Focus on QGraphicsTextItem

  1. #1
    Join Date
    Apr 2015
    Posts
    12
    Thanks
    1
    Qt products
    Qt5
    Platforms
    MacOS X

    Default Re: Set programmatically Focus on QGraphicsTextItem

    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()
    Last edited by EarthHobbit; 22nd April 2015 at 10:57.

Similar Threads

  1. QGraphicsTextItem always gets focus once clicked
    By EarthHobbit in forum Qt Programming
    Replies: 1
    Last Post: 20th April 2015, 08:35
  2. programmatically right click on QSystemTrayIcon
    By noa l in forum Qt Programming
    Replies: 5
    Last Post: 10th April 2011, 14:42
  3. Programmatically Dock
    By venkateshhegde in forum Newbie
    Replies: 4
    Last Post: 14th February 2011, 01:35
  4. Replies: 51
    Last Post: 26th November 2010, 14:24
  5. QGraphicsTextItem focus problem
    By Gopala Krishna in forum Qt Programming
    Replies: 5
    Last Post: 26th June 2007, 18:25

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.