Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. Polish
  4. QTreeWidget
QtWS25 Last Chance

QTreeWidget

Scheduled Pinned Locked Moved Polish
3 Posts 2 Posters 1.3k Views
  • 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.
  • M Offline
    M Offline
    maniek1310
    wrote on last edited by
    #1

    Witam, mam pytanko odnośnie QTreeWidget a mianowicie czy można tak zrobić żeby przy każdym elemencie była możliwość wyboru (pole do zaznaczenia, coś takiego jak checkbox).

    1 Reply Last reply
    0
    • M Offline
      M Offline
      maniek1310
      wrote on last edited by
      #2

      Z tym co w temacie już sobie poradziłem. Teraz mam kolejny problem a mianowicie nie wiem jak po naciśnięciu na przycisk, odznaczyć wszystkie elementy.

      1 Reply Last reply
      0
      • T Offline
        T Offline
        turaz
        wrote on last edited by
        #3

        Cześć, Jeżeli używasz QTreeWidget, to najprostszym sposobem jest pętla wyciągająca każdy QTreeWidgetItem i następnie:
        @item->setCheckState(int column, Qt::CheckState state)@

        Najlepiej jakbyś udostępnił fragment kodu, wtedy można więcej pomóc.

        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