I have a main window which creates multi QWidgets during running. I want to pick up one of them by their Object Name. But when I use findChild(Object Name), it always returns 0. For example,
at the creation of a widget, I used
Qt Code:
  1. MyGui *m_MyGui;
  2. m_MyGui->setObjectName("Cam 1");
To copy to clipboard, switch view to plain text mode 

and I use the following to when I need to get the widget

Qt Code:
  1. MyGui *tmp = findChild<MyGui *>("Cam 1");
To copy to clipboard, switch view to plain text mode 

Any help?