Hi Eike,

thanks for the advice. I'll ask it at

> Would probably be better asked on the interest@ mailing list, anyhow, trying 
> to point to potential problems:
>
> So, you "promoted" all your widgets in designer to "MyClass"?

Yes, that's correct.

>
>> static QGLContext* const _shared_context(new QGLContext(QGLFormat()));
> If you really do that, you create a new QGLContext for each _shared_context() 
> call. But that doesn't look like "real" code, so I suppose you return a 
> single static instance here?

It's not real code... That thing is created only once.

>
>> MyClass():
> I'd think that designer generates code that calls a constructor that takes a 
> "QWidget *parent". Is your constructor actually called?

Well, actually it does. Hey don't ask me. I though it was a hack. But
it seems to work.

>While debugging the frame i
> What does the generated ui_*.h file actually do? Have you debugged what is 
> actually called with what parameters?

I have. The constructor of my class is called with the frame that
contains it (designer is doing that I guess), and I can confirm that
all widgets have the same context. They are just not sharing it.
Drawing fails for all widgets after the first.

=)
Paulo
_______________________________________________
Qt-creator mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/qt-creator

Reply via email to