[Maya-Python] Dynamically add checkBoxes in PySide while being able to refer to them later

2018-11-18 Thread Jakob Kousholt
Hi, I am trying to add a bunch of buttons and UI elements based of a python list. My issue is that I would need to refer to them later to see if they are checked or unchecked. Usually I would assign the button to a variable and check that specific variable for the state of the checkbox like: pota

Re: [Maya-Python] Dynamically add checkBoxes in PySide while being able to refer to them later

2018-11-18 Thread Marcus Ottosson
How about something like this? list = ['potato', 'tomato', 'poop'] boxes = {} for obj in list: boxes[obj] = QtWidgets.QCheckBox() boxes["potato"].checkState() boxes["tomato"].checkState() boxes["poop"].checkState() On Mon, 19 Nov 2018 at 05:54, Jakob Kousholt wrote: > Hi, > > I am trying

Re: [Maya-Python] Dynamically add checkBoxes in PySide while being able to refer to them later

2018-11-19 Thread Justin Israel
>From what part of the world does this cuisine originate? On Mon, Nov 19, 2018, 7:25 PM Marcus Ottosson wrote: > How about something like this? > > list = ['potato', 'tomato', 'poop'] > boxes = {} > for obj in list: > boxes[obj] = QtWidgets.QCheckBox() > > boxes["potato"].checkState() > boxe

Re: [Maya-Python] Dynamically add checkBoxes in PySide while being able to refer to them later

2018-11-19 Thread Marcus Ottosson
I think it's referred to as a "Wellington Stew" On Mon, 19 Nov 2018 at 08:01, Justin Israel wrote: > From what part of the world does this cuisine originate? > > On Mon, Nov 19, 2018, 7:25 PM Marcus Ottosson > wrote: > >> How about something like this? >> >> list = ['potato', 'tomato', 'poop']

Re: [Maya-Python] Dynamically add checkBoxes in PySide while being able to refer to them later

2018-11-20 Thread Jakob Kousholt
Thanks, Marcus. Totally did the trick! Yeah, I wouldn't encourage you to cook that... haha! *Jakob Kousholt - Freelance Creature Modeler and Concept Sculptor* +1 (347) 327-1370 jako...@gmail.com www.jakejk.com On Mon, 19 Nov 2018 at 03:49, Marcus Ottosson wrote: > I think it's referred to as