[vtkusers] QVTK resizing on Windows XP

Clinton Stimpson clinton at elemtech.com
Tue Dec 1 10:06:54 EST 2009


So it looks event loop related.  Have you thought of implementing a 
QAbstractEventDispatcher in terms of delphi, and instantiate it before 
QApplication in your dll, then use a delphi event loop (don't call 
QApplication::exec).  It seems your exe is based on delphi and you're 
putting Qt stuff in a dll, so it would make sense to prefer having a 
delphi event loop.
I've done a Xt/Qt integration that way to make a Qt based firefox 
browser plugin and it was quite simple.

Clint

On 12/01/2009 12:45 AM, Lars Friedrich Lars wrote:
> After some tests I can report that this problem does not occur in paraview. I did not really expect that paraview raises the same rendering issue as my application also works fine on XP when built as standalone program.
> The QVTKWidget cut-off/update/rendering problems only exist when the GUI is called from the DLL interface as there are some weird event loop interferences with the client application's event loop. This may (occasionally) prevent some necessary internal events to fire.
>
> lars
>
> -------- Original-Nachricht --------
>    
>> Datum: Mon, 30 Nov 2009 20:47:49 +0100
>> Von: "Lars Friedrich Lars"<lars-friedrich at gmx.net>
>> An: Clinton Stimpson<clinton at elemtech.com>, vtkusers at vtk.org
>> Betreff: Re: [vtkusers] QVTK resizing on Windows XP
>>      
>    
>> Hello Clint,
>>
>> I will do tests with Paraview tomorrow and report the results to you. I
>> did not use Paraview for a while, but I cannot remember comparable problems
>> with it.
>>
>> lars
>>
>>
>> -------- Original-Nachricht --------
>>      
>>> Datum: Mon, 30 Nov 2009 12:13:05 -0700
>>> Von: Clinton Stimpson<clinton at elemtech.com>
>>> An: vtkusers at vtk.org
>>> Betreff: Re: [vtkusers] QVTK resizing on Windows XP
>>>        
>>      
>>> Oh, then maybe the saveImageToCache() is causing an extra render that is
>>> "solving" you problem.  Do you see the same problem in an application
>>>        
>> like
>>      
>>> paraview, which uses splitters too?
>>>
>>> Clint
>>>
>>> On Monday 30 November 2009 12:07:35 pm Lars Friedrich Lars wrote:
>>>        
>>>> No, I do not call setAutomaticImageCacheEnabled(true) in my
>>>>          
>> application;
>>      
>>>> this features is deactivated. Some cross-platform experiments in the
>>>>          
>>> past
>>>        
>>>> with this flag set to TRUE showed me that it does not reliably work in
>>>>          
>>> 100%
>>>        
>>>> of the cases - as you confirmed below. I just call the related methods
>>>> after resizing the widget as explained in the previous mail. My
>>>>          
>>> application
>>>        
>>>> is basically built as standalone application and - on demand (on
>>>>          
>> windows
>>      
>>>> systems) - with an additional shared lib interface. The described
>>>> workaround works on windows Vista / XP / 2000 for the standalone
>>>>          
>> version
>>      
>>>> and the shared lib interface; it also works on Ubuntu 64 bit.
>>>>
>>>> lars
>>>>
>>>>
>>>> -------- Original-Nachricht --------
>>>>
>>>>          
>>>>> Datum: Mon, 30 Nov 2009 08:21:04 -0700
>>>>> Von: Clinton Stimpson<clinton at elemtech.com>
>>>>> An: vtkusers at vtk.org
>>>>> Betreff: Re: [vtkusers] QVTK resizing on Windows XP
>>>>>
>>>>>
>>>>> Are you calling setAutomaticImageCacheEnabled(true) to enable image
>>>>> caching with it?
>>>>> Maybe you should avoid doing this.
>>>>> I don't know if its been found to be useful in practice as it was
>>>>>            
>> once
>>      
>>>>> tried in ParaView but it didn't work too well.  Whether one has
>>>>>            
>>> problems
>>>        
>>>>> with it is dependent on the windowing system.
>>>>>
>>>>> Personally, I think the problem QVTKWidget's image caching tries to
>>>>> solve, is best solved by the windowing system.  Mac OSX and some
>>>>>            
>> Linux
>>      
>>>>> desktops already do it.
>>>>>
>>>>> Clint
>>>>>
>>>>> On 11/30/2009 08:04 AM, Lars Friedrich Lars wrote:
>>>>>            
>>>>>> Hello,
>>>>>>
>>>>>> I just would like to report a solution to the problem outlined in
>>>>>>              
>>> the
>>>        
>>>>> previous mail:
>>>>>            
>>>>>> It seems to be a pure QVTKWidget problem; after resizing the
>>>>>>              
>>> QVTKWidget
>>>        
>>>>> invoking the following code-cascade works to successfully render the
>>>>>
>>>>> complete viewport:
>>>>>            
>>>>>> qvtk->markCachedImageAsDirty();
>>>>>> qvtk->saveImageToCache();
>>>>>> qvtk->GetRenderWindow()->Render();
>>>>>>
>>>>>> However, it is really interesting that this problem occurs on
>>>>>>              
>>> Windows
>>>        
>>>>>> XP
>>>>>>              
>>>>> only ...
>>>>>
>>>>>            
>>>>>> I must admit that it is a very special situation as the Qt-based
>>>>>>              
>> GUI
>>      
>>> is
>>>        
>>>>> implemented within a DLL and called via a Delphi-client-application.
>>>>>            
>>> You
>>>        
>>>>> can read more about the related signal/slot problems here:
>>>>>
>>>>>            
>>>        
>> http://lists.trolltech.com/pipermail/qt-interest/2009-November/014826.htm
>>      
>>>>> l
>>>>>
>>>>>            
>>>>>> Maybe there are other people struggling around with similar
>>>>>>              
>> problems
>>      
>>>>>> who
>>>>>>              
>>>>> can take advantage of this 'solution'.
>>>>>
>>>>>            
>>>>>> regards,
>>>>>>
>>>>>> lars
>>>>>>
>>>>>>
>>>>>> -------- Original-Nachricht --------
>>>>>>
>>>>>>              
>>>>>>> Datum: Mon, 23 Nov 2009 20:31:22 +0100
>>>>>>> Von: "Lars Friedrich Lars"<lars-friedrich at gmx.net>
>>>>>>> An: vtkusers at vtk.org
>>>>>>> Betreff: [vtkusers] QVTK resizing on Windows XP
>>>>>>>
>>>>>>>
>>>>>>> Hello,
>>>>>>>
>>>>>>> I have an application which uses multiple QVTKWidgets to render
>>>>>>>                
>>>>> different
>>>>>
>>>>>            
>>>>>>> scenes (as shown on the attached screen shots). During run-time I
>>>>>>>                
>>> can
>>>        
>>>>>>> resize the widgets' size with the help of splitters. Normally a
>>>>>>>                
>>>>> VTK-scene (the
>>>>>
>>>>>            
>>>>>>> vtkRenderWindow ...) immediately adapts to the QVTKWidget's size.
>>>>>>>                
>>> But
>>>        
>>>>> on
>>>>>
>>>>>            
>>>>>>> windows XP I am facing serious problems: as can be seen von the
>>>>>>>                
>>> second
>>>        
>>>>> screen
>>>>>
>>>>>            
>>>>>>> shot, the vtkRenderWindow gets cut at the bottom.
>>>>>>>
>>>>>>> Did someone face similiar problems?
>>>>>>>
>>>>>>> It may the worth to annotate that the interactor (e.g. rotating
>>>>>>>                
>> the
>>      
>>>>>>> camera) still works in the cut area at the bottom, but the scene
>>>>>>>                
>> is
>>      
>>>>>>> not
>>>>>>>                
>>>>> rendered.
>>>>>
>>>>>            
>>>>>>> Furthermore, this problem solely exists on Windows XP (32 and 64
>>>>>>>                
>>> bit)
>>>        
>>>>>>> -
>>>>>>>                
>>>>> it
>>>>>
>>>>>            
>>>>>>> works on Windows 2000 / Vista / 7. It also works in an ordinary
>>>>>>>                
>>>>> executable
>>>>>
>>>>>            
>>>>>>> on Windows XP, but not when my user interface is called out of a
>>>>>>>                
>>> DLL.
>>>        
>>>>>>> I guess there are some problems with some openGL buffers in the
>>>>>>>                
>>>>> background
>>>>>
>>>>>            
>>>>>>> and the device context. Are there possibilities to force the
>>>>>>>                
>> render
>>      
>>>>> window
>>>>>
>>>>>            
>>>>>>> to reallocate its buffer?
>>>>>>>
>>>>>>> Can you help me, please? I am kind of desperate.
>>>>>>>
>>>>>>> regards,
>>>>>>>
>>>>>>> lars
>>>>>>>
>>>>>>> --
>>>>>>> GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
>>>>>>> Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
>>>>>>>                
>>>>> _______________________________________________
>>>>> Powered by www.kitware.com
>>>>>
>>>>> Visit other Kitware open-source projects at
>>>>> http://www.kitware.com/opensource/opensource.html
>>>>>
>>>>> Please keep messages on-topic and check the VTK FAQ at:
>>>>> http://www.vtk.org/Wiki/VTK_FAQ
>>>>>
>>>>> Follow this link to subscribe/unsubscribe:
>>>>> http://www.vtk.org/mailman/listinfo/vtkusers
>>>>>            
>>> _______________________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Please keep messages on-topic and check the VTK FAQ at:
>>> http://www.vtk.org/Wiki/VTK_FAQ
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.vtk.org/mailman/listinfo/vtkusers
>>>        
>> -- 
>> Endlich! Das Debüt-Album von Pop-Diva Sarah Kreuz ist da!
>>
>> Jetzt bei GMX Musik Downloads. http://portal.gmx.net/de/go/musik01
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the VTK FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>>      
>    




More information about the vtkusers mailing list