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. Should I use a model / view for this master / detail interface?
Qt 6.11 is out! See what's new in the release blog

Should I use a model / view for this master / detail interface?

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 2 Posters 1.7k 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.
  • GuerrianG Offline
    GuerrianG Offline
    Guerrian
    wrote on last edited by
    #1

    I have a master / detail stored in two arrays and I want to display the data in two tables on the interface. I am not connecting the data to a SQL database, although it is stored in a binary file. Should I use QTableView for both the master and detail, or will there be a problem maintaining the detail / model?

    Linux Mint 18.3
    Qt 5.14.1
    Qt Creator 4.11.1

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

      Hi,

      Where exactly are these data stored ? How are you loading them ?

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

      GuerrianG 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        Where exactly are these data stored ? How are you loading them ?

        GuerrianG Offline
        GuerrianG Offline
        Guerrian
        wrote on last edited by Guerrian
        #3

        @SGaist They are on my disk in a binary file. I'm loading them with QFile open.

        Linux Mint 18.3
        Qt 5.14.1
        Qt Creator 4.11.1

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

          How are you reading them ?

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

          GuerrianG 1 Reply Last reply
          0
          • SGaistS SGaist

            How are you reading them ?

            GuerrianG Offline
            GuerrianG Offline
            Guerrian
            wrote on last edited by Guerrian
            #5

            @SGaist Into some regular C++ arrays with QFile and QDataStream.

            Linux Mint 18.3
            Qt 5.14.1
            Qt Creator 4.11.1

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

              You can implement a custom QAbstractTableModel on top of your data and you should be good.

              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

              • Login

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