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. QStandardItem can only store text?

QStandardItem can only store text?

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

    Hi!

    I'm trying to use a QStandardItemModel and feed it with QStandardItems: I need bool and QString values.

    From the docs, the constructor of QStandardItem is

    @QStandardItem::QStandardItem (const QString & text)@

    and therefore I don't know whether it's possible to store those boolean values in this class.

    The goal is to use the model with a QDataWidgetMapper with two QLineEdit and one QCheckBox.

    Any hint?

    Thank you very much!

    David

    1 Reply Last reply
    0
    • S Offline
      S Offline
      stima_ua
      wrote on last edited by
      #2

      @virtual void setData ( const QVariant & value, int role = Qt::UserRole + 1 )@

      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