Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QListWidget Iterating
Qt 6.11 is out! See what's new in the release blog

QListWidget Iterating

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 2.2k 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    It concerns me a bit when I see "list" in the name and all I can find are examples such as this:

    @
    QListWidget* list; // initialized else where

    for(int i = 0; i < list->count(); i++){
    list->item(i); // do something
    }
    @

    If QListWidget is using a linked list than this bit of code is redundant. I was hoping someone can confirm this for me.

    1 Reply Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #2

      No, QListWidget doesn't use linked list, it uses model-view architecture. If you don't specify model it creates QListModel implicitly.

      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
      • Unsolved