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. Need help for Model/View programming
Forum Updated to NodeBB v4.3 + New Features

Need help for Model/View programming

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 750 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.
  • H Offline
    H Offline
    Hareen Laks
    wrote on last edited by
    #1

    Hi all,

    I'm going to create Window like below to select the particular item from the Database.

    !http://s14.postimg.org/sh6sawri9/sample_ui.png(Sample gui)!

    Window should be worked like this;
    When user select the 'Size' only available 'Type's and available 'Value's should be appeared in the combo boxes. In another words, below two combo boxes should be filtered.
    Moreover, Value combo box to be filtered when 'Type' change.

    My problem is what is the optimum way for doing that using model/view programming?
    Actually I don't know which model (e.g. QStringListModel) is suitable for this job. And need to think of storing the selected properties of the item.

    Thanks in advance.

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andreyc
      wrote on last edited by
      #2

      I'm not an expert in Model-View framework.
      There is a "Custom Sort/Filter Model Example":http://qt-project.org/doc/qt-5/qtwidgets-itemviews-customsortfiltermodel-example.html that talks about filtering models.

      1 Reply Last reply
      0
      • H Offline
        H Offline
        Hareen Laks
        wrote on last edited by
        #3

        Dear andreyc,

        I missed your reply. May be my e-mail notifications were caught as spams.

        I'll try this example and get back to you if I get a problem.

        Thank you for helping me.

        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