Window.isChild

returns true if widget is child of either main widget or one of popups

class Window
bool
isChild

Meta