uic generates the ui_stuff.h file from your stuff.ui file.

The name of the variable holding a pointer to your custom widget is set by you in Designer and carried over into generated UI code. In Designer:
untitled.jpg
and in the generated code is the class that the ui pointer points to an instance of:
Qt Code:
  1. #include <QtGui/QButtonGroup>
  2. #include <QtGui/QFrame>
  3. #include <QtGui/QHBoxLayout>
  4. #include <QtGui/QHeaderView>
  5. #include <QtGui/QWidget>
  6.  
  7. QT_BEGIN_NAMESPACE
  8.  
  9. class Ui_Form
  10. {
  11. public:
  12. QHBoxLayout *horizontalLayout;
  13. QFrame *myCustomFrame; // <<<<< here
  14.  
  15. void setupUi(QWidget *Form)
  16. {
  17. ...
  18. // <<<< and here
  19. myCustomFrame = new QFrame(Form);
  20. myCustomFrame->setObjectName(QString::fromUtf8("myCustomFrame"));
  21. myCustomFrame->setFrameShape(QFrame::Box);
  22. ...
  23. } // setupUi
  24. ...
  25. };
  26. ...
  27. #endif // UI_UNTITLED_H
To copy to clipboard, switch view to plain text mode 
so in your code you can access it through the ui pointer thus:
Qt Code:
  1. ui->myCustomFrame;
To copy to clipboard, switch view to plain text mode