Python Forum
[PyQt] Get class 's children on init
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PyQt] Get class 's children on init
#1
class DataForm(QtGui.QGroupBox):
   def __init__(self, parent, task=None):
       QtGui.QWidget.__init__(self, parent)   

       self.labelHello = QtGui.QLabel(self)
       self.labelHello.setText("This is My Widget")


       children = self.children()
I 'm trying to get the children in the init of the class.
It' a GroupBox with two text boxes in it.
But it gets no children, returns empty.
Reply


Messages In This Thread
Get class 's children on init - by panoss - Jan-05-2017, 07:17 PM
RE: Get class 's children on init - by nilamo - Jan-05-2017, 08:42 PM
RE: Get class 's children on init - by panoss - Jan-05-2017, 09:48 PM
RE: Get class 's children on init - by panoss - Jan-06-2017, 08:11 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to iterate through sub-children in TkTree? WuchaDoin 0 6,936 Dec-21-2018, 07:00 PM
Last Post: WuchaDoin

Forum Jump:

User Panel Messages

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