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. Possible to use QAbstractListmodel columncount() function?
Forum Updated to NodeBB v4.3 + New Features

Possible to use QAbstractListmodel columncount() function?

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

    Hi,

    I am new to qt list model. It is possible to set column count in the QAbstractlistmodel? It is possible to assign the set the data based on the different role names?

    VRoninV 1 Reply Last reply
    0
    • E eswaramrth03

      Hi,

      I am new to qt list model. It is possible to set column count in the QAbstractlistmodel? It is possible to assign the set the data based on the different role names?

      VRoninV Offline
      VRoninV Offline
      VRonin
      wrote on last edited by
      #2

      @eswaramrth03 said in Possible to use QAbstractListmodel columncount() function?:

      I am new to qt list model.

      The answer then is to use QAbstractItemModel* model = new QStandardItemModel(parent); this way you can easily use all the pre-baked functionalities of QStandardItemModel without loosing the flexibility of replacing your model in the future with a custom one

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      1 Reply Last reply
      2

      • Login

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