Results 1 to 5 of 5

Thread: QCompleter is not appearing on a widget added to a scene

  1. #1
    Join Date
    Dec 2010
    Posts
    3
    Thanks
    1

    Default QCompleter is not appearing on a widget added to a scene

    Hi everyone,
    well, on a normal QWidget the QCompleter works just fine.
    I have no idea why it's not working on a QWidget added to a scene.


    Thanks,
    Rodrigo.

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

    Default Re: QCompleter is not appearing on a widget added to a scene

    Does it help if you set the Qt::BypassGraphicsProxyWidget window flag on the widget containing the completer?
    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.


  3. #3
    Join Date
    Dec 2010
    Posts
    3
    Thanks
    1

    Default Re: QCompleter is not appearing on a widget added to a scene

    Quote Originally Posted by wysota View Post
    Does it help if you set the Qt::BypassGraphicsProxyWidget window flag on the widget containing the completer?
    It did not work. Actually, it made the program slower.

    PS: The completer is on a QTextEdit inside the QWidget added to the scene, I took it from the QtDemo.

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

    Default Re: QCompleter is not appearing on a widget added to a scene

    It's likely this will simply not work without reimplementing QCompleter internals. You would have to at least call QCompleter::popup() with an appropriate rectangle based on the position of the proxy widget in the scene instead of the position of the real text edit (because it's not even visible and doesn't have valid coordinates).
    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.


  5. The following user says thank you to wysota for this useful post:

    Rodrigo.Celler (3rd December 2010)

  6. #5
    Join Date
    Dec 2010
    Posts
    3
    Thanks
    1

    Default Re: QCompleter is not appearing on a widget added to a scene

    Hi again,
    now I see that there's a bigger problem.
    When I move the completer->popUp(), I have to set the valid coordinates of the view, not the scene, but I dont think there's a way to get the coordinates of the QWidget based on the view.

Similar Threads

  1. Replies: 1
    Last Post: 28th October 2010, 22:36
  2. Replies: 0
    Last Post: 27th July 2010, 12:48
  3. Replies: 1
    Last Post: 18th February 2010, 08:53
  4. Replies: 1
    Last Post: 12th October 2008, 08:21
  5. How to remove widget added in runtime?
    By jiveaxe in forum Qt Programming
    Replies: 7
    Last Post: 2nd November 2007, 10:13

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.