giugio
24th March 2013, 15:43
hello.
I have this code:
int x, y, w, h = 0;
x = ptrGlWidgetImage->rect().x();
y = ptrGlWidgetImage->rect().y();
w = ptrGlWidgetImage->rect().width();
h = ptrGlWidgetImage->rect().height();
ptrGlWidgetImage->m_ptrRenderer = shared_ptr<CRenderer> (new CRenderer(x, w , h , y));
where ptrGlWidgetImage is a qglwidget.
the ptrGlWidgetimage is inside a qmdisubwindow
the values are x:0, w:800 , h:600 , y:0
but if I places this code inside the qglwidget class I obtains:
x:0 , w:786, h :563, y:0
that is the correct size for my opengl purpose.
the problem is that i must obtain these value from outside the qglwidget class.
I see mapfrom , matopglobal ecc... but i'm not understand.
Why inside the qglwidget i obtain these value ? are the no display subwindow area ?
thanks.
I have this code:
int x, y, w, h = 0;
x = ptrGlWidgetImage->rect().x();
y = ptrGlWidgetImage->rect().y();
w = ptrGlWidgetImage->rect().width();
h = ptrGlWidgetImage->rect().height();
ptrGlWidgetImage->m_ptrRenderer = shared_ptr<CRenderer> (new CRenderer(x, w , h , y));
where ptrGlWidgetImage is a qglwidget.
the ptrGlWidgetimage is inside a qmdisubwindow
the values are x:0, w:800 , h:600 , y:0
but if I places this code inside the qglwidget class I obtains:
x:0 , w:786, h :563, y:0
that is the correct size for my opengl purpose.
the problem is that i must obtain these value from outside the qglwidget class.
I see mapfrom , matopglobal ecc... but i'm not understand.
Why inside the qglwidget i obtain these value ? are the no display subwindow area ?
thanks.