Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 4

Qt-interest Archive, September 2007
centralWidget qmainwindow


Message 1 in thread

Hello

 I have strange problem with graphicsview and qmainwindow widget. My
graphicsview widget is central widget of widget which is inherit after
qmainwindow. I want to create new qgraphicsview to switch with first but
i still have only Segmentation fault.

 Even if I call         QWidget * widget = centralWidget();
 I get Segmentation fault.

 What it could be?

PS




--
 [ signature omitted ] 

Message 2 in thread

On 22.09.07 10:15:08, PrzemysÅaw Staniszewski wrote:
>  I have strange problem with graphicsview and qmainwindow widget. My
> graphicsview widget is central widget of widget which is inherit after
> qmainwindow. I want to create new qgraphicsview to switch with first but
> i still have only Segmentation fault.
> 
>  Even if I call         QWidget * widget = centralWidget();
>  I get Segmentation fault.

Please provide a complete, small example that shows the problem, neither
from your description nor the code-line its visible what your problem
might be.

Andreas

-- 
 [ signature omitted ] 

Message 3 in thread

Sorry for such delay to answer.  Error was in the other place of course.
In application I have Two independent widows. To be true, the second
window, when the dimension of central widget in first window is set is
making by constructor when one of params is pointer to the first window.
It's all be goof but I call the second window form singleton designed
pattern, which if no second window was constructed before, it making it.
And this was bad because then it was making with NULL pointer to the
first
window :)

Anyway, thank for your response.


Dnia 22-09-2007, sob o godzinie 10:48 +0200, Andreas Pakulat napisaÅ(a):

> On 22.09.07 10:15:08, PrzemysÅaw Staniszewski wrote:
> >  I have strange problem with graphicsview and qmainwindow widget. My
> > graphicsview widget is central widget of widget which is inherit after
> > qmainwindow. I want to create new qgraphicsview to switch with first but
> > i still have only Segmentation fault.
> > 
> >  Even if I call         QWidget * widget = centralWidget();
> >  I get Segmentation fault.
> 
> Please provide a complete, small example that shows the problem, neither
> from your description nor the code-line its visible what your problem
> might be.
> 
> Andreas
>