[vtkusers] QVTKWidget Python Issue

Nicola Creati ncreati at inogs.it
Thu Mar 8 08:10:33 EST 2012


Hello David,
I added the patch and everything now works. All methods are exposed.
Thank you.

Nicola


On 03/07/2012 03:57 PM, David Gobbi wrote:
> Hi Nicola,
>
> Try adding the following lines to VTK/GUISupport/Qt/CMakeLists.txt, if
> it works then I can submit this as a VTK patch:
>
> --- a/GUISupport/Qt/CMakeLists.txt
> +++ b/GUISupport/Qt/CMakeLists.txt
> @@ -221,6 +221,12 @@ if(VTK_WRAP_PYTHON_SIP)
>       )
>     ENDIF(VTK_QT_USE_WEBKIT)
>
> +  # GUISupport/Qt doesn't have a hierarchy file, use Rendering
> +  IF(VTK_IGNORE_BTX)
> +  SET(KIT_HIERARCHY_FILE
> +      ${VTK_BINARY_DIR}/Rendering/vtkRenderingHierarchy.txt)
> +  ENDIF(VTK_IGNORE_BTX)
> +
>     VTK_WRAP_PYTHON3(vtkQtPython QVTK_PythonSrcs "${QVTK_PythonHeaders}")
>     VTK_ADD_LIBRARY(vtkQtPythonD ${QVTK_PythonSrcs})
>     TARGET_LINK_LIBRARIES(vtkQtPythonD QVTK vtkViewsPythonD vtkRenderingPythonD v
>
>
> On Wed, Mar 7, 2012 at 1:30 AM, Nicola Creati<ncreati at inogs.it>  wrote:
>> Hello,
>> I have compiled last github VTK under Windows7 64bit making Python Binding
>> and enabling the new QVTKWidget. I noted that the interactor of the
>> QVTKWidget exposes only few methods. If i compile the source under Linux the
>> QVTKWidget interactor exposes several methods as expected. This simple code
>> shows what I mean:
>>
>> from PyQt4.QtGui import *
>> import vtk
>> import sys
>>
>> app = QApplication(sys.argv)
>> w = vtk.QVTKWidget()
>> rwi = w.GetInteractor()
>> print dir(rwi)
>>
>> This is the output on Window:
>>
>> ['ContextMenuEvent', 'DragEnterEvent', 'DragLeaveEvent', 'DragMoveEvent',
>> 'DropE
>> vent', 'GetClassName', 'Initialize', 'IsA', 'Start', 'StartListening',
>> 'StopList
>> ening', 'TerminateApp', 'TimerEvent']
>>
>>
>> This kind on behaviour does not let my application to run on Linux and
>> Window.
>> Why does it happen? Can be fixed?
>>
>> Thanks.
>>
>> Nicola
>>
>>
>> --
>> Nicola Creati
>> Istituto Nazionale di Oceanografia e di Geofisica Sperimentale - OGS
>> www.inogs.it Dipartimento di Geofisica della Litosfera Geophysics of
>> Lithosphere Department CARS (Cartography and Remote Sensing) Research Group
>> http://www.inogs.it/Cars/ Borgo Grotta Gigante 42/c 34010 Sgonico - Trieste
>> - ITALY ncreati at ogs.trieste.it
>> off.   +39 040 2140 213
>> fax.   +39 040 327307
>>
>> _____________________________________________________________________
>> This communication, that may contain confidential and/or legally privileged
>> information, is intended solely for the use of the intended addressees.
>> Opinions, conclusions and other information contained in this message, that
>> do not relate to the official business of OGS, shall be considered as not
>> given or endorsed by it. Every opinion or advice contained in this
>> communication is subject to the terms and conditions provided by the
>> agreement governing the engagement with such a client. Any use, disclosure,
>> copying or distribution of the contents of this communication by a
>> not-intended recipient or in violation of the purposes of this communication
>> is strictly prohibited and may be unlawful. For Italy only: Ai sensi del
>> D.Lgs.196/2003 - "T.U. sulla Privacy" si precisa che le informazioni
>> contenute in questo messaggio sono riservate ed a uso esclusivo del
>> destinatario.
>> _____________________________________________________________________
>>
>> _______________________________________________
>> 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


-- 
Nicola Creati
Istituto Nazionale di Oceanografia e di Geofisica Sperimentale - OGS www.inogs.it Dipartimento di Geofisica della Litosfera Geophysics of Lithosphere Department CARS (Cartography and Remote Sensing) Research Group http://www.inogs.it/Cars/ Borgo Grotta Gigante 42/c 34010 Sgonico - Trieste - ITALY ncreati at ogs.trieste.it
off.   +39 040 2140 213
fax.   +39 040 327307

_____________________________________________________________________
This communication, that may contain confidential and/or legally privileged information, is intended solely for the use of the intended addressees. Opinions, conclusions and other information contained in this message, that do not relate to the official business of OGS, shall be considered as not given or endorsed by it. Every opinion or advice contained in this communication is subject to the terms and conditions provided by the agreement governing the engagement with such a client. Any use, disclosure, copying or distribution of the contents of this communication by a not-intended recipient or in violation of the purposes of this communication is strictly prohibited and may be unlawful. For Italy only: Ai sensi del D.Lgs.196/2003 - "T.U. sulla Privacy" si precisa che le informazioni contenute in questo messaggio sono riservate ed a uso esclusivo del destinatario.
_____________________________________________________________________




More information about the vtkusers mailing list