Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > PyQt GUI

Reply
Thread Tools

PyQt GUI

 
 
Helvin
Guest
Posts: n/a
 
      07-08-2009
Hi experts!

I'm developing a GUI for a software using PyQT, and need 3D
visualization. Should I use PyOpenGL or VTK?
I understand that the PyQt package comes with a opengl module. What
else would I need? I think I need to download opengl. but how? where?
I have VTK and pyVTK installed, but I don't know how to use it in my
code, as when I run it, an error says it can't find the vtk module.

Help would be sooooo appreciated!
Helvin
 
Reply With Quote
 
 
 
 
Diez B. Roggisch
Guest
Posts: n/a
 
      07-08-2009
Helvin wrote:

> Hi experts!
>
> I'm developing a GUI for a software using PyQT, and need 3D
> visualization. Should I use PyOpenGL or VTK?
> I understand that the PyQt package comes with a opengl module. What
> else would I need? I think I need to download opengl. but how? where?
> I have VTK and pyVTK installed, but I don't know how to use it in my
> code, as when I run it, an error says it can't find the vtk module.


VTK won't mix with Qt. And I don't think you need to download opengl - it
either comes with your system (or gfx-drivers), or not. I'm not sure if Qt
actually wraps the OpenGL api itself, AFAIK it doesn't, so you need
PyOpenGL I guess.

Diez
 
Reply With Quote
 
 
 
 
Phil Thompson
Guest
Posts: n/a
 
      07-08-2009
On Wed, 08 Jul 2009 11:11:51 +0200, "Diez B. Roggisch"
<(E-Mail Removed)>
wrote:
> Helvin wrote:
>
>> Hi experts!
>>
>> I'm developing a GUI for a software using PyQT, and need 3D
>> visualization. Should I use PyOpenGL or VTK?
>> I understand that the PyQt package comes with a opengl module. What
>> else would I need? I think I need to download opengl. but how? where?
>> I have VTK and pyVTK installed, but I don't know how to use it in my
>> code, as when I run it, an error says it can't find the vtk module.

>
> VTK won't mix with Qt. And I don't think you need to download opengl - it
> either comes with your system (or gfx-drivers), or not. I'm not sure if

Qt
> actually wraps the OpenGL api itself, AFAIK it doesn't, so you need
> PyOpenGL I guess.


VTK has explicit support for both Qt (ie. via C++) and PyQt.

Phil
 
Reply With Quote
 
Diez B. Roggisch
Guest
Posts: n/a
 
      07-08-2009
Phil Thompson wrote:

> On Wed, 08 Jul 2009 11:11:51 +0200, "Diez B. Roggisch"
> <(E-Mail Removed)>
> wrote:
>> Helvin wrote:
>>
>>> Hi experts!
>>>
>>> I'm developing a GUI for a software using PyQT, and need 3D
>>> visualization. Should I use PyOpenGL or VTK?
>>> I understand that the PyQt package comes with a opengl module. What
>>> else would I need? I think I need to download opengl. but how? where?
>>> I have VTK and pyVTK installed, but I don't know how to use it in my
>>> code, as when I run it, an error says it can't find the vtk module.

>>
>> VTK won't mix with Qt. And I don't think you need to download opengl - it
>> either comes with your system (or gfx-drivers), or not. I'm not sure if

> Qt
>> actually wraps the OpenGL api itself, AFAIK it doesn't, so you need
>> PyOpenGL I guess.

>
> VTK has explicit support for both Qt (ie. via C++) and PyQt.


Oh, I'm sorry for the FUD - they talk about Tk on their homepage.

Diez
 
Reply With Quote
 
Helvin
Guest
Posts: n/a
 
      07-08-2009
On Jul 8, 9:23*pm, Phil Thompson <(E-Mail Removed)> wrote:
> On Wed, 08 Jul 2009 11:11:51 +0200, "Diez B. Roggisch"
> <(E-Mail Removed)>
> wrote:
>
>
>
>
>
> > Helvin wrote:

>
> >> Hi experts!

>
> >> I'm developing a GUI for a software using PyQT, and need 3D
> >> visualization. Should I use PyOpenGL or VTK?
> >> I understand that the PyQt package comes with a opengl module. What
> >> else would I need? I think I need to download opengl. but how? where?
> >> I have VTK and pyVTK installed, but I don't know how to use it in my
> >> code, as when I run it, an error says it can't find the vtk module.

>
> > VTK won't mix with Qt. And I don't think you need to download opengl - it
> > either comes with your system (or gfx-drivers), or not. I'm not sure if

> Qt
> > actually wraps the OpenGL api itself, AFAIK it doesn't, so you need
> > PyOpenGL I guess.

>
> VTK has explicit support for both Qt (ie. via C++) and PyQt.
>
> Phil


Thanks for the fast replies! I will look into how to use VTK now.
Where would I find VTK's explicit support for PyQt?

Because I have installed VTK (using its installer) and pyVTK (using
its setup.py file), but how do I actually use it in my code? According
to: http://www.nabble.com/embedded-VTK-w...d23521455.html,
I have tried 'import vtk', but python can't find the vtk module.

Thanks a million!
Helvin
 
Reply With Quote
 
Robert Kern
Guest
Posts: n/a
 
      07-08-2009
On 2009-07-08 18:10, Helvin wrote:

> Thanks for the fast replies! I will look into how to use VTK now.
> Where would I find VTK's explicit support for PyQt?


Wrapping/Python/vtk/qt4/ in the VTK sources.

> Because I have installed VTK (using its installer) and pyVTK (using
> its setup.py file), but how do I actually use it in my code? According
> to: http://www.nabble.com/embedded-VTK-w...d23521455.html,
> I have tried 'import vtk', but python can't find the vtk module.


Then you have not installed VTK's Python bindings correctly. Note that pyVTK is
just a library for manipulating VTK files. The VTK Python bindings are part of
VTK's distribution itself. Exactly how did you install VTK? Did you compile it
yourself?

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco

 
Reply With Quote
 
Juan Pablo Romero Méndez
Guest
Posts: n/a
 
      07-09-2009
I use OpenInventor (Coin3d) which have a python binding called "pivy".
It works great.

http://pivy.coin3d.org/

Juan Pablo

2009/7/8 Helvin <(E-Mail Removed)>:
> Hi experts!
>
> I'm developing a GUI for a software using PyQT, and need 3D
> visualization. Should I use PyOpenGL or VTK?
> I understand that the PyQt package comes with a opengl module. What
> else would I need? I think I need to download opengl. but how? where?
> I have VTK and pyVTK installed, but I don't know how to use it in my
> code, as when I run it, an error says it can't find the vtk module.
>
> Help would be sooooo appreciated!
> Helvin
> --
> http://mail.python.org/mailman/listinfo/python-list
>

 
Reply With Quote
 
Helvin
Guest
Posts: n/a
 
      07-09-2009
On Jul 9, 11:29*am, Robert Kern <(E-Mail Removed)> wrote:
> On 2009-07-08 18:10, Helvin wrote:
>
> > Thanks for the fast replies! I will look into how to use VTK now.
> > Where would I find VTK's explicit support for PyQt?

>
> Wrapping/Python/vtk/qt4/ in the VTK sources.
>
> > Because I have installed VTK (using its installer) and pyVTK (using
> > its setup.py file), but how do I actually use it in my code? According
> > to:http://www.nabble.com/embedded-VTK-w...cation-td23521...,
> > I have tried 'import vtk', but python can't find the vtk module.

>
> Then you have not installed VTK's Python bindings correctly. Note that pyVTK is
> just a library for manipulating VTK files. The VTK Python bindings are part of
> VTK's distribution itself. Exactly how did you install VTK? Did you compile it
> yourself?
>
> --
> Robert Kern
>
> "I have come to believe that the whole world is an enigma, a harmless enigma
> * that is made terrible by our own mad attempt to interpret it as though it had
> * an underlying truth."
> * *-- Umberto Eco


You mean, when I download VTK, the VTK Python bindings come with it?
I downloaded VTK from:http://vtk.org/files/release/5.4/

I downloaded pyVTK from: http://pypi.python.org/pypi/PyVTK/0.4.67
And then installed it by the command 'python setup.py install'
according to: http://cens.ioc.ee/projects/pyvtk/
I understand that this command runs the file called 'setup.py' that
came with the pyVTK download.

Thanks so much for your help! I am very desperate now...

Helvin
 
Reply With Quote
 
Helvin
Guest
Posts: n/a
 
      07-09-2009
On Jul 9, 6:27*pm, Helvin <(E-Mail Removed)> wrote:
> On Jul 9, 11:29*am, Robert Kern <(E-Mail Removed)> wrote:
>
>
>
>
>
> > On 2009-07-08 18:10, Helvin wrote:

>
> > > Thanks for the fast replies! I will look into how to use VTK now.
> > > Where would I find VTK's explicit support for PyQt?

>
> > Wrapping/Python/vtk/qt4/ in the VTK sources.

>
> > > Because I have installed VTK (using its installer) and pyVTK (using
> > > its setup.py file), but how do I actually use it in my code? According
> > > to:http://www.nabble.com/embedded-VTK-w...cation-td23521...,
> > > I have tried 'import vtk', but python can't find the vtk module.

>
> > Then you have not installed VTK's Python bindings correctly. Note that pyVTK is
> > just a library for manipulating VTK files. The VTK Python bindings are part of
> > VTK's distribution itself. Exactly how did you install VTK? Did you compile it
> > yourself?

>
> > --
> > Robert Kern

>
> > "I have come to believe that the whole world is an enigma, a harmless enigma
> > * that is made terrible by our own mad attempt to interpret it as though it had
> > * an underlying truth."
> > * *-- Umberto Eco

>
> You mean, when I download VTK, the VTK Python bindings come with it?
> I downloaded VTK from:http://vtk.org/files/release/5.4/
>
> I downloaded pyVTK from:http://pypi.python.org/pypi/PyVTK/0.4.67
> And then installed it by the command 'python setup.py install'
> according to:http://cens.ioc.ee/projects/pyvtk/
> I understand that this command runs the file called 'setup.py' that
> came with the pyVTK download.
>
> Thanks so much for your help! I am very desperate now...
>
> Helvin


I googled: vtk for beginners python.
From there, I found this: http://www.nabble.com/pls-help-how-t...d14977428.html
And from there, this: http://www-viz.tamu.edu/courses/viza...TKInstall.html

This last one has very detailed info about how to get started with
VTK. I am now redoing the installing VTK thing. Hope it will work.

Helvin
 
Reply With Quote
 
Robert Kern
Guest
Posts: n/a
 
      07-09-2009
On 2009-07-09 01:27, Helvin wrote:
> On Jul 9, 11:29 am, Robert Kern<(E-Mail Removed)> wrote:
>> On 2009-07-08 18:10, Helvin wrote:
>>
>>> Thanks for the fast replies! I will look into how to use VTK now.
>>> Where would I find VTK's explicit support for PyQt?

>> Wrapping/Python/vtk/qt4/ in the VTK sources.
>>
>>> Because I have installed VTK (using its installer) and pyVTK (using
>>> its setup.py file), but how do I actually use it in my code? According
>>> to:http://www.nabble.com/embedded-VTK-w...cation-td23521...,
>>> I have tried 'import vtk', but python can't find the vtk module.

>> Then you have not installed VTK's Python bindings correctly. Note that pyVTK is
>> just a library for manipulating VTK files. The VTK Python bindings are part of
>> VTK's distribution itself. Exactly how did you install VTK? Did you compile it
>> yourself?

>
> You mean, when I download VTK, the VTK Python bindings come with it?
> I downloaded VTK from:http://vtk.org/files/release/5.4/


Exactly which file did you download? I don't think the vtk-5.4.x-win32.exe
installers have the Python bindings. You will need to build VTK from sources.

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ANN: wrapper GUI for pygtk, pyqt, wxpython and tkinter Stelios Xanthakis Python 0 10-17-2004 03:28 AM
ANN: GUI wrapper for pygtk, pyqt and wxpython Stelios Xanthakis Python 9 10-15-2004 09:52 AM
PyQT, automatically creating GUI for configuration options =?UTF-8?B?0JTQsNC80ZjQsNC9INCT0LXQvtGA0LPQuNC10LLRgdC60Lg=?= Python 2 06-23-2004 07:56 AM
[PY GUI] interest function in python GUI(wxpython,pyqt) program.wxpython,pyqt ulysses Python 4 10-22-2003 03:28 PM
[pyqt] Can't show QString textLabel in windows 98 GUI program ulysses Python 5 10-14-2003 11:38 AM



Advertisments