I've got a simple app (no functionality yet, just laying it out) that opens with a dialog box with 2 buttons. If you hit one button another Dialog box opens and when you hit OK/Cancel from that Dialog control goes back to the original dialog. If you hit the other button the otherDialog box opens but when you hit OK/Cancel from that dialog, once it closes out and the original dialog box comes back into view, I can't click on the original dialog anymore. It's like it's grayed out. I just hear a ding in the background each time I try to click anywhere on it. I can't see anything that I'm doing differently between the 2. Are there any parenting issues involved here?
in my header for the main dialog box
the constructor for main dialog boxCode:
{ Q_OBJECT public: virtual ~cMainWindowDlg(); void setupUi(); private slots: // Automatically connected slots. Note these slots follow the naming convention // on_objectName_signalName() void on_mOkButton_clicked(); void on_mCancelButton_clicked(); void on_mLaborCategoryButton_clicked(); void on_mContractButton_clicked(); private: cLaborCategoryDlg * mLaborCategoryDlg; cContractDataQueryDlg * mContractDataDlg; }; // cMainWindowDlg
Code:
//////////////////////////////////////////////////////////////////////////////// mLaborCategoryDlg(0), mContractDataDlg(0) { // Note that setupUi() will also automatically connect any slots that follow // the naming conventions. setupUi(); mLaborCategoryDlg = new cLaborCategoryDlg(this); //Managed by Qt mContractDataDlg = new cContractDataQueryDlg(this); //Managed by Qt } // cMainWindowDlg::cMainWindowDlg void cMainWindowDlg::setupUi() { Ui_cMainWindowDlg::setupUi(this); // Must call the base class setupUi first } // cMainWindowDlg::setupUi
the 2 buttons that open up the other dialog boxes
Code:
void cMainWindowDlg::on_mLaborCategoryButton_clicked() { bool accepted(mLaborCategoryDlg->exec())); //true=>OK false=>Cancel } void cMainWindowDlg::on_mContractButton_clicked() { bool accepted(mContractDataDlg->exec())); //true=>OK false=>Cancel }