Quote Originally Posted by Urthas View Post
Does the following basically sum up the logic of what you want to do?
Qt Code:
  1. QRect r = yourLayout.geometry();
  2. yourWidget.resize(r.width(), r.height());
To copy to clipboard, switch view to plain text mode 
Ok. @Lykurg is right - I should use code that I dont't understand. I've read class reference about it. I think it's not what I'm looking for. I've tried code above but it doesn't work. My widget looks like this:

Qt Code:
  1. WykreSlupkowy::WykresSlupkowy(*QWidget parent) : QWidget(parent)
  2. {
  3. }
  4.  
  5. void WykresSlupkowy::paintEvent(QPaintEvent *event)
  6. {
  7. paintMyWidget();
  8. QWidget::paintEvent(event);
  9. }
  10.  
  11. void WykresSlupkowy::resizeEvent(QResizeEvent *event)
  12. {
  13. QWidget::reziseEvent(event);
  14. }
To copy to clipboard, switch view to plain text mode 

So what should I do to get size I want?

thanks in advance
best regards
Tomasz