I'm showing content of my application that loads file and show the names, values, etc.
I'm trying to learn and use qml, I was using QWebView.

I'm resizing the widget elements manually with a line that lets you "move" it resizing a TreeWidget (in the left side) and the "View" (in the right side):

Qt Code:
  1. void MapBrowser::redoLayout(const QSize& twsize, const QSize& wvsize)
  2. {
  3. static int padleft = ui->treeWidget->x();
  4. static int padmid = ui->line->x() - ui->treeWidget->x() - ui->treeWidget->width();
  5.  
  6. if (this->size() == this->minimumSize()) return;
  7.  
  8. if (twsize.width() < ui->treeWidget->minimumSize().width()) return;
  9. if (wvsize.width() < ui->declarativeView->minimumSize().width()) return;
  10. //if (wvsize.width() < ui->webView->minimumSize().width()) return;
  11.  
  12. ui->treeWidget->resize(twsize);
  13. ui->declarativeView->resize(wvsize);
  14. //ui->webView->resize(wvsize);
  15.  
  16. QPoint twmove(padleft, ui->treeWidget->y());
  17. QPoint lnmove(ui->treeWidget->x() + ui->treeWidget->width() + padmid, ui->line->y());
  18. QPoint wvmove(ui->line->x() + ui->line->width() + padmid, ui->declarativeView->y());
  19. //QPoint wvmove(ui->line->x() + ui->line->width() + padmid, ui->webView->y());
  20.  
  21. ui->treeWidget->move(twmove);
  22. ui->line->move(lnmove);
  23. ui->declarativeView->move(wvmove);
  24. //ui->webView->move(wvmove);
  25. }
To copy to clipboard, switch view to plain text mode 

But, my problem is:
I need to update the size of the main Rectangle, how can I do this ?