Hi all!

I recently started using Qt 4.6.0 to create a GUI for a computer vision program I previously coded in C...
Everything is going well - I've created my main window and that works perfectly!

All I want to do now is be able to open a dialog (created in Qt Designer) from this main window.

I've used the multiple inheritance approach (as described here) for my main window:

MainWindow.h (form has ObjectName=MainWindow in Qt Designer)
Qt Code:
  1. #include "ui_MainWindow.h"
  2. class MainWin : public QMainWindow, private Ui::MainWindow
  3. {
  4. Q_OBJECT
  5.  
  6. public:
  7. MainWin(QWidget *parent = 0);
  8.  
  9. // etc.
  10. }
To copy to clipboard, switch view to plain text mode 

MainWindow.cpp
Qt Code:
  1. #include <QtGui>
  2. #include "MainWindow.h"
  3. #include "CameraConnectDialog.h"
  4. MainWin::MainWin(QWidget *parent) : QMainWindow(parent)
  5. {
  6. setupUi(this);
  7.  
  8. // etc.
  9. }
To copy to clipboard, switch view to plain text mode 

main.cpp
Qt Code:
  1. #include <QApplication>
  2. #include "MainWindow.h"
  3.  
  4. int main(int argc, char *argv[])
  5. {
  6. QApplication app(argc, argv);
  7. MainWin mainwindow;
  8. mainwindow.show();
  9. return app.exec();
  10. }
To copy to clipboard, switch view to plain text mode 

CameraConnectDialog.h
(form has ObjectName=CameraConnectDialog in Qt Designer)
Qt Code:
  1. #include "ui_CameraConnectDialog.h"
  2.  
  3. class CameraConnectDialog : public QDialog
  4. {
  5. Q_OBJECT
  6.  
  7. public:
  8. CameraConnectDialog(QWidget *parent = 0);
  9. };
To copy to clipboard, switch view to plain text mode 

CameraConnectDialog.cpp
Qt Code:
  1. #include <QtGui>
  2. #include "CameraConnectDialog.h"
  3.  
  4. CameraConnectDialog::CameraConnectDialog(QWidget *parent) : QDialog(parent)
  5.  
  6. {
  7. // code to go here
  8. }
To copy to clipboard, switch view to plain text mode 

I then attempt to open this dialog using the following in one of the member functions of class MainWin (in MainWindow.cpp):
Qt Code:
  1. CameraConnectDialog dialog(this);
  2. dialog.exec();
To copy to clipboard, switch view to plain text mode 

I get no compilation errors with this but when the above dialog.exec() is invoked, a blank dialog appears as opposed to the one I actually created...

My .pro file also contains all the appropriate forms and headers.

Are there any mistakes in the way I've incorporated my dialog into my main window?
I'm pulling my hair out over this and would really appreciate if someone could point my in the right direction!

Thanks!!!