Your question mentions QTreeView. Are these query terms represented in a hierarchical structure like a tree? What is the meaning when two terms appear on the same line? Does it mean a logical OR? ("2k" OR "4k" ?) And what is the meaning of each line? Are two lines a logical AND? (("2k" or "4k") AND ("action_essentials") ?)
If not, then what is the point of a tree, and how will dragging and dropping be used to assemble a meaningful query?
On Amazon's shopping search pages, when there are multiple versions / suppliers of a product, there -is- a tree-like structure of checkboxes and descriptive names, arranged into different categories. So there could be a "Supplier" category, with multiple choices within it. Each checkbox within a category is a logical OR. Between categories ("Supplier" and "Price range") is a logical AND (Supplier is ABC OR XYZ AND Price range is $100 - 200).
Are you trying to do something like this, except graphically?
If there is no hierarchy to your filter terms, then the tree structure doesn't sound like it would be appropriate. You might want to use something like a simple layout with QLabels instead. The Flow Layout example is a self-rearranging layout for arbitrarily-sized items in a rectangular region.
Otherwise, I am not aware of any "out of the box" widget or layout that will do what you want.




Reply With Quote

Bookmarks