Python Forum
[PyQt] choose checkbox
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PyQt] choose checkbox
#1
Hi, I have this code with pyqt5:

    elif (content1 == "next"):
            todos = ["one" , "two" , "three" , "four", "five"]
            self.todo_listWidget.show()
            for todo in todos:
                item = QListWidgetItem(todo)
                item.setFlags(item.flags() | QtCore.Qt.ItemIsUserCheckable)
                item.setCheckState(QtCore.Qt.Unchecked) 

                self.todo_listWidget.addItem(item)
And I want if i chose one item make something
like if item (x) is checked then do something



how can i do this?
Reply


Messages In This Thread
choose checkbox - by devilonline - Feb-16-2023, 11:48 PM
RE: choose checkbox - by Axel_Erfurt - Feb-17-2023, 01:23 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [Tkinter] Dynamic checkbox treeview issue OogieM 8 8,265 Mar-20-2022, 02:10 PM
Last Post: OogieM
  tkinter change the text of the checkbox zazas321 1 5,524 Sep-17-2021, 06:19 AM
Last Post: zazas321
  [PyQt] How do I display the DB table I will choose from the QComboBox in QTableWidget JokerSob 2 3,253 Aug-05-2021, 03:00 PM
Last Post: JokerSob
  How to get the value of a checkbox scratchmyhead 4 4,368 May-14-2020, 02:56 PM
Last Post: scratchmyhead
  Tkinter checkbox value scratchmyhead 5 5,088 May-09-2020, 11:44 PM
Last Post: menator01
  Which GUI should I choose ? Matprog49 2 3,332 Apr-25-2020, 02:12 PM
Last Post: Matprog49
  TreeviewWith CheckBox issac_n 1 8,902 Mar-08-2020, 06:51 AM
Last Post: shamnadinn
  Tkinter Checkbox niro_one 1 3,071 Jan-13-2020, 11:31 AM
Last Post: joe_momma
  [Tkinter] Choose from dropdown list and then do something? Selfiatus1 2 6,366 Jun-07-2019, 08:43 PM
Last Post: Selfiatus1
  [Tkinter] Unable to create checkbox and select at run time tej7gandhi 5 6,300 May-05-2019, 04:57 PM
Last Post: tej7gandhi

Forum Jump:

User Panel Messages

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