[Python] How can I get rich text to QListView items in PyQt5 (QItemDelegate?)

Discussão em 'Python' iniciado por Stack, Outubro 4, 2024.

  1. Stack

    Stack Membro Participativo

    I'm creating a personnel management software for my own use and basically I'd want to get my QListView to be prettier and more informative than by using QStandardItemModel and QStandardItem.

    Essentially I'd like for the list to look something like this:

      Mr Smith sick
      Mrs Smith working
      Mr Anderson traveling
      Ms White working

    Preferably also with an option of colors, but I couldn't find a quick tutorial for this.

    I've understood that this could be accomplished by using QItemDelegate, but I tried to look at the documentation and it made my brain hurt. Could somebody inform how could I add rich-formatted text items to a QListView or point to a "for dummies" -tutorial? Thanks!

    Continue reading...

Compartilhe esta Página