Does it possible to resize QMdiSubWindow by resizing internal window.
The code is illustrate that resizing works wrong except if you try to resize whole QMdiSubWindow.

Thanks a lot.

Qt Code:
  1. mwindow::mwindow()
  2. {
  3. workspace=new QMdiArea;
  4. setCentralWidget(workspace);
  5.  
  6. menubar=new QMenuBar(this);
  7. setMenuBar(menubar);
  8. taction=menubar->addAction("test");
  9. connect(taction, SIGNAL(triggered( bool )), this, SLOT(action()));
  10. }
  11.  
  12.  
  13. mwindow::~mwindow()
  14. {}
  15.  
  16. void mwindow::action()
  17. {
  18.  
  19. QWidget *tw=new QWidget(this);
  20. QVBoxLayout *tlayout=new QVBoxLayout(tw);
  21. QPushButton *button=new QPushButton(tw);
  22. tlayout->addWidget(button);
  23.  
  24. // resizing working good here
  25. workspace->addSubWindow(tw)->resize(200,200);
  26.  
  27. tw->show();
  28. // Trying to resize internal window. No effect. does it possible?
  29. tw->resize(100,100);
  30. }
To copy to clipboard, switch view to plain text mode