PDA

View Full Version : activeWindow control problem



batileon
17th October 2008, 03:41
I now have a QWidget, clicking a button in this widget would call another window(A Q3MainWindow).

I have set the show() and setActiveWindow() to the new window, however I found that the new window don't have the control, it just appears as showing the ui, there's no response with any event of the new window(like clicking buttons).
Meanwhile I found that the original window still gain the control(which I don't expect it to do so)

Can anyone tell me what's going on? Or what should I do?



NewWin *newWin = new NewWin();
newWin->show();
newWin->setActiveWindow();

(NewWin inherits Q3MainWindow)


Thanks

spirit
17th October 2008, 07:37
can you show code wher you set up ui for both widget and how you create them?
it would be nice if this code will be compilable. :)

batileon
17th October 2008, 07:42
For the NewWin class:

NewWin::NewWin(QWidget *parent) : Q3MainWindow(parent)
{
setupUi(this);
init();
}

spirit
17th October 2008, 07:44
it's not enough.