Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QCompleter highlight item as the user types ahead how to.
Forum Updated to NodeBB v4.3 + New Features

QCompleter highlight item as the user types ahead how to.

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mastronardif
    wrote on last edited by
    #1

    QCompleter.

    I reviewed the sample completer and it does most of what I want its excellent.

    I would like it to behave like the completer in the int Qt Editor
    where the user can list the methods for an object and it highlights the name as he types.

    I want the user to be able to type ahead to a list but only allow them to pick from the list and only from the list. Its a more restrictive case.

    Also I noticed the pop up window does NOT stay with the parent window.
    When I move the parent window the pop list stays in its current position.

    Does anyone know how i can make the pop up behave like I want.

    TIA
    Frank M.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Unless I'm mistaken, your description makes me think about a QComboBox rather than a QLineEdit + QCompleter. Wouldn't that combo do what you want ?

      As for the popup bug, can you reproduce this with a minimal compilable example ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mastronardif
        wrote on last edited by
        #3

        As for the floating window NOT being anchored you can try the completer examples
        they all behave the same. Run it have the completer get activated then move the window behind it before you make a selection.
        You will able able to move it and have the completer view stay in its original spot I am on a MAC.

        see: Qt/Examples/Qt-5.4/widgets/tools/completer

        As for a combo box it doesn't work the same as the pop completer view. You have to continue to type and it will move to the item. But if you
        pause between key strokes it resets its type ahead information.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved