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 model filtering

QCompleter model filtering

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 1.2k 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
    mcpolandc
    wrote on last edited by
    #1

    Hi Guys,

    I am using a tree model implementation of QAbstractItemModel to hold function names read in from a file. Each child of the root node has a function name held as it's data item and if the function has a class, the class name is also held in the model. The reason I have done this is so that I can (in theory) filter the QCompleter popup according to the class that is being used. This is all being used to provide code completion for languages as yous can probably guess.

    Pseudo-code Example:

    //This is the front end using the coding language of choice

    myObj = myClass()

    myObj.SomeFunction()

    After the '.' is entered, I want the model to filter to the functions that are part of the class that MyObj is. I have been reading the documentation but am unable to find anything suitable for QCompleter for filtering based on something as custom as this. Any help would be much appreciated.

    Thanks

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mcpolandc
      wrote on last edited by
      #2

      Can anyone help with this?

      Could I possibly use a separate proxy model to filter the source tree model? Has anyone ever tried this?

      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