Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. PyQT5 Combobox re-sort??
Forum Updated to NodeBB v4.3 + New Features

PyQT5 Combobox re-sort??

Scheduled Pinned Locked Moved Unsolved Qt for Python
qt for pythonpython
1 Posts 2 Posters 1.1k 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.
  • S Offline
    S Offline
    shift838
    wrote on last edited by
    #1

    I am trying to figure out how to resort my combobox with PYQT5 and python when a new item is added.

    I can get it to add, but it will not sort.

    I am just doing a very basic example to get it functioning

    self.comboloadsystem.addItem(favfile + ".xml")

    I have the combobox set to add items alphabetically, but I am assuming I will need to do something grammatically.

    I have not found a refresh option.

    I have tried to count the items and put them in an array and re-add with .addItems(array) but it still puts it in the same place.

    any suggestions?

    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