Hello Stefan. Thank you for the answer, but I have found the root cause of
the problem, and I'm writing because I want to document this for you too.

The problem was that the instance implementing mitkRenderingManager was not
a QmitkRenderingManager but a TestingRenderingManager. This was happening
because I have never registered the QmitkRenderingManagerFactory.

The design behind this is nice, a singleton with the possibility to be
implemented by different objects by using a factory.

What's confusing is that the registration of the factory is done from
inside the TestingRenderingManagerFactory constructor that is called when
loading the translation unit generated when compiling
mitkRenderingManager.cpp. It is kind of very deep into the code. It would
be great to make it more explicit, or to write something to the log when
setting the factory.

I have added a call to QmitkRegisterClasses() before I do anything else on
my code and the QmitkStdMultiWidget is working ok.

Thanks,

Federico

On Tue, Nov 8, 2016 at 6:49 AM, Kislinskiy, Stefan <
[email protected]> wrote:

> Hi Frederico,
>
>
>
> QmitkStdMultiWidget calls UpdateAllWidgets() at the end of many of its
> methods. Did you try this as well? Possibly there are a few flaws in the
> implementation as we only use this widget in the workbench, where it works
> fine as fas as I can see.
>
>
>
> Best,
>
> Stefan
>
>
>
> *From:* Federico Milano [mailto:[email protected]]
> *Sent:* Montag, 31. Oktober 2016 15:20
> *To:* [email protected]
> *Subject:* [mitk-users] QmitkStdMultiWidget update in Qt application
>
>
>
> Hi. I'm using QmitkStdMultiWidget in a standalone Qt application (not the
> MITK Workbench). I'm having a problem when changing the size of the
>  QmitkStdMultiWidget container widget. The actual size changes, but the
> render windows are not updated (see attached screenshot). If I capture the
> Qt resizeEvent and I execute a ForceImmediateUpdateAll it updates the
> render windows ok. But if I execute a RequestUpdate in that event handler
> nothing happens.
>
>
>
> Then I have several questions:
>
>
>
> 1) Is it the intended behaviour that the render windows in
> QmitkStdMultiWidget don't get updated when changing the size of the
> underlying QWidget?
>
>
>
> 2) If so, how can I update the render windows? I would prefer to do it
> using the message loop, but it seems that it is necessary to force the
> update. Is that correct?
>
>
>
> Thanks!
>
>
>
> Federico
>
------------------------------------------------------------------------------
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to