tags:

views:

49

answers:

1
+3  A: 

Try this instead of your SomeBtnClicked method:

MyWidgetClass *mwc;

void MyMainWindowClass::SomeBtnClicked()
{
    std::cout << "Some Btn has been clicked" << std::endl;
    this->setEnabled(false);

    if (!mwc)
        mwc = new MyWidgetClass(this);
    mwc->show();
    mwc->raise();
    mwc->setActiveWindow();  // Qt 4: activateWindow()

    return;
}
Philip Daubmeier
Works fine with mwc as a member variable of MyMainWindowClass.
Opera