Python Forum
QListWidget, no item was selected
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QListWidget, no item was selected
#1
Hi,

if I have a listwidget, is it possible to detect if no item of the listwidget was selected?

I searched the web, but found nothing helpful...

amount_of_selected_items = self.listbox_profile.selectedItems().count()
if amount_of_selected_items == 0:
    QMessageBox("text")
thanks...
Reply


Messages In This Thread
QListWidget, no item was selected - by flash77 - Aug-01-2023, 06:37 PM
RE: QListWidget, no item was selected - by flash77 - Aug-02-2023, 03:39 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to get the color name of qlistwidget? flash77 5 1,376 Aug-13-2023, 07:01 PM
Last Post: flash77
  GUI Problem / call another function / fill QListwidget flash77 5 981 Jul-30-2023, 04:29 PM
Last Post: flash77
  [PyQt] populate a QListWidget devilonline 1 1,679 Apr-10-2023, 02:52 AM
Last Post: deanhystad
  [PyQt] How to always select the item in the first column when a row is selected DrakeSoft 1 1,702 Feb-17-2023, 07:43 PM
Last Post: DrakeSoft
Question [PyQt] CSS Styling for a QLabel inside a QListWidget Alfalfa 2 5,236 Nov-30-2020, 02:59 AM
Last Post: Alfalfa
  How to get the selected item from Listbox and convert it to int? Jionni 8 5,250 Feb-17-2020, 11:07 AM
Last Post: Jionni
  Update value selected in option menu when select an item from text box klllmmm 2 5,097 Jun-06-2019, 04:51 AM
Last Post: klllmmm
  Why QListWidget doesn't show new line? AlekseyPython 3 3,431 Feb-05-2019, 02:23 PM
Last Post: AlekseyPython

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020