Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. German
  4. Model / View - data-Funktion "Role"
Forum Updated to NodeBB v4.3 + New Features

Model / View - data-Funktion "Role"

Scheduled Pinned Locked Moved Unsolved German
4 Posts 3 Posters 559 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.
  • N Offline
    N Offline
    NotYourFan
    wrote on last edited by
    #1

    Hey,

    ich wollte mal fragen ob es für "Buttons" auch eine Role für die TableView gibt.
    Es gibt ja "DisplayRole" --> Einfaches Eingabefeld ... dann "CheckStateRole" --> CheckBox ...

    Gibt es auch eine "...Role" für Buttons?

    raven-worxR 1 Reply Last reply
    0
    • N NotYourFan

      Hey,

      ich wollte mal fragen ob es für "Buttons" auch eine Role für die TableView gibt.
      Es gibt ja "DisplayRole" --> Einfaches Eingabefeld ... dann "CheckStateRole" --> CheckBox ...

      Gibt es auch eine "...Role" für Buttons?

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @notyourfan said in Model / View - data-Funktion "Role":

      Gibt es auch eine "...Role" für Buttons?

      du meinst die automatisch erstellten Editoren?
      Nein gibt es nicht, Buttons haben auch nicht wirklich was verloren in ItemViews

      Wenn unbedingt notwendig kannst du die Funktionalität aber selbst erstellen in deinem Delegate, welcher via eine MouseArea und einem Loader deinen Button lädt und eine custom Role setzt.

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      0
      • A Offline
        A Offline
        AandO
        wrote on last edited by AandO
        #3

        Hi,

        es gibt aber eine Qt::UserRole, die für customized roles benutzt werden kann.

        Qt::UserRole 0x0100 The first role that can be used for application-specific purposes.

        raven-worxR 1 Reply Last reply
        0
        • A AandO

          Hi,

          es gibt aber eine Qt::UserRole, die für customized roles benutzt werden kann.

          Qt::UserRole 0x0100 The first role that can be used for application-specific purposes.

          raven-worxR Offline
          raven-worxR Offline
          raven-worx
          Moderators
          wrote on last edited by raven-worx
          #4

          @aando
          das ist der "Marker" für die erste Custom Role. Du kannst jetzt einen beliebigen Wert addieren z.B.
          Er darf einfach nicht niedriger sein als dieser Wert.
          Custom Roles funktionieren natürlich auch nur mit Custom Models ;)

          --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
          If you have a question please use the forum so others can benefit from the solution in the future

          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