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. QListWidgetItem is not being selected
Forum Updated to NodeBB v4.3 + New Features

QListWidgetItem is not being selected

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

    Hi,

    When I'm selecting an item from my qlistwidget it triggers currentItemChanged() signal but the selected item returns false on qlistwidget.currentItem().isSelected()

    self.ui.itemList.currentItemChanged.connect(self.addToProcessingList)
    def addToProcessingList(self):
    if self.ui.itemList.currentItem().isSelected(): print self.ui.Testbenches.currentItem().text()]

    Why it returns FALSE when the item is actually selected?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Why not use the parameters of currentItemChanged to get the current item ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      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