Results 1 to 2 of 2

Thread: Focus in QGraphicsWidgetProxy

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2010
    Posts
    36
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Focus in QGraphicsWidgetProxy

    Hi there

    I've a widget that is created by the QtCreator and containes a QLineEdit.
    Then this widget is embbeded in a QGraphicsRectItem. When i click on the line edit it gets the editing focus. But no cursor is shown in the line edit.
    This is quite confusing. because the user don't realize that he can edit the text.

    Is this a Qt bug?
    Probably not...

    In the constructor of the QGraphicsRectItemthere is code like this:
    Qt Code:
    1. m_pWidgetsProxy->setWidget(m_pFilterWidgets);
    2. m_pWidgetsProxy->setFocusPolicy(Qt::ClickFocus);
    To copy to clipboard, switch view to plain text mode 

    Cheers Luke
    Using Qt 4.7
    Developping on Win 7 and XP
    Using Qt Creator, Eclipse and Visual Studio
    Target Platforms Win, Linux and soon OS X

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,372
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Focus in QGraphicsWidgetProxy

    Please provide a minimal compilable example reproducing the problem.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Window focus issues (How to force focus to a window?)
    By montylee in forum Qt Programming
    Replies: 3
    Last Post: 25th April 2009, 01:00
  2. focus
    By hgedek in forum Newbie
    Replies: 3
    Last Post: 25th December 2007, 19:14
  3. i want to lose the focus...
    By jrodway in forum Qt Programming
    Replies: 7
    Last Post: 14th July 2007, 10:04
  4. Focus issues / Setting multiple focus
    By ComputerPhreak in forum Qt Programming
    Replies: 1
    Last Post: 16th February 2007, 06:09
  5. Focus Help please
    By munna in forum Qt Programming
    Replies: 3
    Last Post: 15th November 2006, 18:09

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
  •  
Qt is a trademark of The Qt Company.