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
#4
On the mousePressEvent  I get the correct children!!


def mousePressEvent (self, event):
   children = self.findChildren(QtGui.QTextEdit)  
   for widget in children:
       print('DataForm:getChildren=', widget.objectName())
So maybe it's just in which event I use this code?
In which event do you think I should put it?

Init is rejected, paint event is rejected, showEvent rejected too...
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,923 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