Function Widget.childIndex

returns index of widget in child list, -1 if passed widget is not a child of this widget

int childIndex(
  Widget item
);