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. Forcing the last item in a QListWidget to appear at the very bottom of the list
Forum Updated to NodeBB v4.3 + New Features

Forcing the last item in a QListWidget to appear at the very bottom of the list

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 2.0k 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
    notgary
    wrote on last edited by
    #1

    I'd like to implement a QListWidget that has one particular QListWidgetItem that will always be fixed at the very bottom of the visible portion of the widget. This will always be the same item and it should always appear at the bottom in the same way the first item maintains it's position at the top. The figure below illustrates what I'm after.

    !http://i.stack.imgur.com/3Tvgw.png!

    If I were laying out widgets in a layout, I would use QBoxLayoutaddStretch to force the widgets to remain apart, but there doesn't appear to be anything similar for QListWidget. Does anyone have any idea how I could go about achieving this?

    1 Reply Last reply
    0
    • R Offline
      R Offline
      raaghuu
      wrote on last edited by
      #2

      you could use insertItem() instead of addItem() to add new items...

      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