Guest User

Untitled

a guest
Oct 17th, 2017
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. Center::Center(){
  2. setViewMode(QMdiArea::TabbedView);
  3. setTabShape(QTabWidget::Triangular);
  4. }
  5.  
  6. Center::~Center(){
  7. QHashIterator<QString, QMdiSubWindow*> i(hashWidget);
  8. while (i.hasNext()){
  9. i.next();
  10. delete i.value();
  11. }
  12. }
  13.  
  14. void Center::open(const QString& nom){
  15. QWidget *w = new QWidget();
  16. w->setWindowTitle(nom);
  17. hashWidget.insert(nom, addSubWindow(w));
  18. QString s(hashWidget.key(activeSubWindow()));
  19. cout << "Debug" << s.toStdString() << endl;
  20. }
  21.  
  22. void Center::close(const QString& nom){
  23. removeSubWindow(hashWidget.value(nom));
  24. }
Add Comment
Please, Sign In to add comment