[vtk-developers] I would like to give some VTK classes

John Platt jcplatt at dsl.pipex.com
Thu Jan 7 07:22:00 EST 2010


Dear Naszta,

That works - thanks ... but my app now crashes on closing with

    "QWidget: Must construct a QApplication before a QPaintDevice"

I delete the output window in MainWindow::closeEvent(). This is the trace 
back

> QtCored4.dll!qt_message_output(QtMsgType msgType=QtFatalMsg, const char * 
> buf=0x09e8de58)  Line 2214 C++
  QtCored4.dll!qt_message(QtMsgType msgType=QtFatalMsg, const char * 
msg=0x659c7ef8, char * ap=0x0012fc4c)  Line 2272 + 0x12 bytes C++
  QtCored4.dll!qFatal(const char * msg=0x659c7ef8, ...)  Line 2455 + 0xf 
bytes C++
  QtGuid4.dll!QWidgetPrivate::QWidgetPrivate(int version=263680)  Line 209 + 
0xb bytes C++
  QtGuid4.dll!QDesktopWidgetPrivate::QDesktopWidgetPrivate()  Line 144 + 
0x14 bytes C++
  QtGuid4.dll!QDesktopWidget::QDesktopWidget()  Line 250 + 0x4d bytes C++
  QtGuid4.dll!QApplication::desktop()  Line 3062 + 0x22 bytes C++
  QtGuid4.dll!QWidget::saveGeometry()  Line 6653 + 0x4b bytes C++
  PafVu.exe!QVTKOutputWindow::~QVTKOutputWindow()  Line 74 + 0xd bytes C++
  PafVu.exe!QVTKOutputWindow::`scalar deleting destructor'()  + 0xf bytes 
C++
  PafVu.exe!vtkQtOutputWindow::~vtkQtOutputWindow()  Line 125 + 0x24 bytes 
C++
  PafVu.exe!vtkQtOutputWindow::`scalar deleting destructor'()  + 0xf bytes 
C++
  PafVu.exe!vtkObjectBase::UnRegisterInternal(vtkObjectBase * 
__formal=0x00000000, int check=0)  Line 260 + 0x23 bytes C++
  PafVu.exe!vtkObject::UnRegisterInternal(vtkObjectBase * o=0x00000000, int 
check=0)  Line 886 C++
  PafVu.exe!vtkObjectBase::UnRegister(vtkObjectBase * o=0x00000000)  Line 
172 + 0x15 bytes C++
  PafVu.exe!vtkObjectBase::Delete()  Line 117 + 0x11 bytes C++
  PafVu.exe!vtkOutputWindow::SetInstance(vtkOutputWindow * 
instance=0x00000000)  Line 179 + 0x15 bytes C++
  PafVu.exe!vtkOutputWindowCleanup::~vtkOutputWindowCleanup()  Line 67 + 0x7 
bytes C++
  PafVu.exe!`dynamic atexit destructor for 'vtkOutputWindow::Cleanup''()  + 
0xd bytes C++
  msvcr90d.dll!1023bd05()
  [Frames below may be incorrect and/or missing, no symbols loaded for 
msvcr90d.dll]
  PafVu.exe!WinMain(HINSTANCE__ * instance=0x00000000, HINSTANCE__ * 
prevInstance=0x0012ffb8, char * __formal=0x01411462, int cmdShow=0)  Line 
135 + 0x17 bytes C++

Regards,

John.

----- Original Message ----- 
From: "Nasztanovics Ferenc" <naszta at naszta.hu>
To: "John Platt" <jcplatt at dsl.pipex.com>
Cc: "VTK Develop" <vtk-developers at vtk.org>
Sent: Thursday, January 07, 2010 11:20 AM
Subject: Re: [vtk-developers] I would like to give some VTK classes


> Use should use vtkOutputWindow::SetInstance function to make your
> class default.
>
> Best regards,
>
> Naszta
>
>
>
> On 2010.01.07., at 19:19, "John Platt" <jcplatt at dsl.pipex.com> wrote:
>
>> Dear Naszta,
>>
>> Thank you for your code updates. The text is now displayed but when
>> VTK
>> outputs an error message, it is shown in a new vtkOutputWindow, not
>> the Qt
>> VTK output window (see attached image). Sorry for causing you these
>> problems.
>>
>> Regards,
>>
>> John.
>>
>> ----- Original Message -----
>> From: "Nasztanovics Ferenc" <naszta at naszta.hu>
>> To: "John Platt" <jcplatt at dsl.pipex.com>; <vtk-developers at vtk.org>
>> Sent: Thursday, January 07, 2010 6:33 AM
>> Subject: RE: [vtk-developers] I would like to give some VTK classes
>>
>>
>> I attached the corrected code. In this version you can easily just use
>> vtkQtOutputWindow class, QVTKOutputWindow will be automatically
>> created. I
>> will finish the documentation till Friday, but the code is good now.
>>
>> Usage:
>>
>> vtkQtOutputWindow* ow = vtkQtOutputWindow::New();
>> ow->DisplayText("some text");
>>
>> Best regards,
>>
>> Naszta
>> ________________________________________
>> Feladó: John Platt [jcplatt at dsl.pipex.com]
>> Küldve: 2010. január 6. 23:41
>> Címzett: Nasztanovics Ferenc; vtk-developers at vtk.org
>> Tárgy: Re: [vtk-developers] I would like to give some VTK classes
>>
>> Dear Ferenc,
>>
>> I have been trying to use QVTKOutputWindow on WinXP as follows
>>
>>    vtkQtOutputWindow* ow = vtkQtOutputWindow::New();
>>    QVTKOutputWindow* qtow = new QVTKOutputWindow( this );
>>    qtow ->setShowOnLogAdded( true );
>>    ow ->DisplayText("some text");
>>
>> but nothing is shown. I think the problem is that there are 2
>> instances of
>> vtkQtOutputWindow, "ow" and the instance created in the constructor of
>> QVTKOutputWindow, each sharing the single instance of vtkOutputWindow.
>> Nothing is shown because "ow" has no
>> TextEditTarget set.
>>
>> It may be difficult to derive
>>
>>    vtkQtOutputWindow : public vtkOutputWindow
>>
>> because vtkOutputWindow is a vtkWin32OutputWindow on Windows and not
>> vtkOutputWindow.
>> The potential for your classes is to be able to output QString's but
>> I don't
>> see how this can be done at present.
>>
>> Regards,
>> John.
>>
>>
>>
>> ----- Original Message -----
>> From: "Nasztanovics Ferenc" <naszta at naszta.hu>
>> To: <vtk-developers at vtk.org>
>> Sent: Tuesday, December 08, 2009 7:09 AM
>> Subject: [vtk-developers] I would like to give some VTK classes
>>
>>
>> Dear Kitware,
>>
>> I use your VTK library for years. I would like to add 3 useful
>> library for
>> QVTK.
>>
>> For QVTK:
>>
>> 1) vtkQtOutputWindow
>>
>> It is a subclass of vtkOutputWindow and it writes out VTK output to
>> a Qt
>> widget (vtkQtOutTextWidget).
>>
>> 2) vtkQtOutTextWidget
>>
>> It is a thread safe widget to write out VTK output. Qt 4.4 or higher
>> its
>> base is QPlainTextEdit, else QTextEdit.
>>
>> 3) QVTKOutputWindow
>>
>> It is a full implementation of output window. Practically it is made
>> in
>> "main" function.
>>
>> For Infovis:
>>
>> 4) vtkSimple3DCirclesStrategy
>>
>> It is a graph drawing strategy. It works on vtkDirectedGraphs, where
>> there
>> is no loop.
>>
>> Best regards,
>>
>> Ferenc Nasztanovics
>>
>>
>>
>>> _______________________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.vtk.org/mailman/listinfo/vtk-developers
>>>
>>>
>>
>>
>> <qtvtk.PNG>
> 





More information about the vtk-developers mailing list