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. [Solved] Edit an AbstractListModel with a QFileDialog
Forum Updated to NodeBB v4.3 + New Features

[Solved] Edit an AbstractListModel with a QFileDialog

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 2.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.
  • D Offline
    D Offline
    daviddoria
    wrote on last edited by
    #1

    [Sorry, I accidentally overrode this question, and do not see a way to rollback].

    The original question was trying to set model data on the click event of a view. The solution was simple, and is demonstrated here:
    http://programmingexamples.net/wiki/Qt/ModelView/AbstractListModelFileDialog

    1 Reply Last reply
    0
    • G Offline
      G Offline
      goetz
      wrote on last edited by
      #2

      In method AbstractListModel::setData() you should store the supplied value somewhere. You do nothing with it.

      http://www.catb.org/~esr/faqs/smart-questions.html

      1 Reply Last reply
      0
      • D Offline
        D Offline
        daviddoria
        wrote on last edited by
        #3

        Volker, thanks, I see. I'll get used to using models sooner or later... :)

        1 Reply Last reply
        0
        • G Offline
          G Offline
          goetz
          wrote on last edited by
          #4

          You're welcome. Keep in mind, that you are completely responsible of managing the data storage. QAbstractItemModel just provides the interface for a standardized way of accessing and setting the data, the implementation is solely up to you.

          http://www.catb.org/~esr/faqs/smart-questions.html

          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