wx vs Qt

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

wx vs Qt

Brennan Williams
I'm interested in seeing how a Traits/Chaco app runs on Windows with a
Qt backend rather than wx. Is this possible under Windows? What do I
need to do to switch?

I also have a few wx specifics to do with image capture and copying to
the clipboard and also a number of imports from
enthought.traits.ui.wx... I presume I'll have to sort these out somehow?

Thanks

Brennan


_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: wx vs Qt

fred-2
Le 22/01/2011 11:30, Brennan Williams a écrit :
> I'm interested in seeing how a Traits/Chaco app runs on Windows with a
> Qt backend rather than wx. Is this possible under Windows? What do I
> need to do to switch?
>
> I also have a few wx specifics to do with image capture and copying to
> the clipboard and also a number of imports from
> enthought.traits.ui.wx... I presume I'll have to sort these out somehow?
I had to import in my all source files (almost) this line:

from enthought.etsconfig.api \
      import ETSConfig

For instance, to manage Font with both backends:
.../...

                     if (ETSConfig.toolkit == 'wx'):
                         font_size = self.font.GetPointSize()
                         .../...
                     elif (ETSConfig.toolkit == 'qt4'):
                         font_size = self.font.pointSize()

.../...


Another example, to have the same "look" with Qt and WX for Color trait,
you have to set style='custom' for WX and style='simple' for Qt...


Cheers,

PS: I never tested my code with Qt4 backend under Vista...

--
Fred
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: wx vs Qt

Brennan Williams
On 23/01/2011 12:53 a.m., Fred wrote:

> Le 22/01/2011 11:30, Brennan Williams a écrit :
>> I'm interested in seeing how a Traits/Chaco app runs on Windows with a
>> Qt backend rather than wx. Is this possible under Windows? What do I
>> need to do to switch?
>>
>> I also have a few wx specifics to do with image capture and copying to
>> the clipboard and also a number of imports from
>> enthought.traits.ui.wx... I presume I'll have to sort these out somehow?
> I had to import in my all source files (almost) this line:
>
> from enthought.etsconfig.api \
>        import ETSConfig
>
> For instance, to manage Font with both backends:
> .../...
>
>                       if (ETSConfig.toolkit == 'wx'):
>                           font_size = self.font.GetPointSize()
>                           .../...
>                       elif (ETSConfig.toolkit == 'qt4'):
>                           font_size = self.font.pointSize()
>
> .../...
>
>
OK thanks for that Fred.
One basic question, how do I actually switch Traits over to using Qt?

I tried putting the following at the top of my app...

from enthought.etsconfig.api import ETSConfig
ETSConfig.toolkit='qt4'

but I get an error about not having PyQt4.

Hmm, I'm using EPD. I think perhaps EPD doesn't ship with Qt?


> Another example, to have the same "look" with Qt and WX for Color trait,
> you have to set style='custom' for WX and style='simple' for Qt...
>
>
> Cheers,
>
> PS: I never tested my code with Qt4 backend under Vista...
>


_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: wx vs Qt

Chris Colbert


On Sat, Jan 22, 2011 at 4:29 PM, Brennan Williams <[hidden email]> wrote:
On 23/01/2011 12:53 a.m., Fred wrote:
> Le 22/01/2011 11:30, Brennan Williams a écrit :
>> I'm interested in seeing how a Traits/Chaco app runs on Windows with a
>> Qt backend rather than wx. Is this possible under Windows? What do I
>> need to do to switch?
>>
>> I also have a few wx specifics to do with image capture and copying to
>> the clipboard and also a number of imports from
>> enthought.traits.ui.wx... I presume I'll have to sort these out somehow?
> I had to import in my all source files (almost) this line:
>
> from enthought.etsconfig.api \
>        import ETSConfig
>
> For instance, to manage Font with both backends:
> .../...
>
>                       if (ETSConfig.toolkit == 'wx'):
>                           font_size = self.font.GetPointSize()
>                           .../...
>                       elif (ETSConfig.toolkit == 'qt4'):
>                           font_size = self.font.pointSize()
>
> .../...
>
>
OK thanks for that Fred.
One basic question, how do I actually switch Traits over to using Qt?

I tried putting the following at the top of my app...

from enthought.etsconfig.api import ETSConfig
ETSConfig.toolkit='qt4'

but I get an error about not having PyQt4.

Hmm, I'm using EPD. I think perhaps EPD doesn't ship with Qt?


EPD does not ship with PyQt because of licensing issues. You will need to install that for yourself, then either set the ETSConfig.toolkit object like you showed, or use the environment variable approach:

$ export ETS_TOOLKIT=qt4

or

C:\ set ETS_TOOLKIT=qt4 

> Another example, to have the same "look" with Qt and WX for Color trait,
> you have to set style='custom' for WX and style='simple' for Qt...
>
>
> Cheers,
>
> PS: I never tested my code with Qt4 backend under Vista...
>


_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev


_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: wx vs Qt

Brennan Williams
On 23/01/2011 10:40 a.m., Chris Colbert wrote:


On Sat, Jan 22, 2011 at 4:29 PM, Brennan Williams <[hidden email]> wrote:
On 23/01/2011 12:53 a.m., Fred wrote:
> Le 22/01/2011 11:30, Brennan Williams a écrit :
>> I'm interested in seeing how a Traits/Chaco app runs on Windows with a
>> Qt backend rather than wx. Is this possible under Windows? What do I
>> need to do to switch?
>>
>> I also have a few wx specifics to do with image capture and copying to
>> the clipboard and also a number of imports from
>> enthought.traits.ui.wx... I presume I'll have to sort these out somehow?
> I had to import in my all source files (almost) this line:
>
> from enthought.etsconfig.api \
>        import ETSConfig
>
> For instance, to manage Font with both backends:
> .../...
>
>                       if (ETSConfig.toolkit == 'wx'):
>                           font_size = self.font.GetPointSize()
>                           .../...
>                       elif (ETSConfig.toolkit == 'qt4'):
>                           font_size = self.font.pointSize()
>
> .../...
>
>
OK thanks for that Fred.
One basic question, how do I actually switch Traits over to using Qt?

I tried putting the following at the top of my app...

from enthought.etsconfig.api import ETSConfig
ETSConfig.toolkit='qt4'

but I get an error about not having PyQt4.

Hmm, I'm using EPD. I think perhaps EPD doesn't ship with Qt?


EPD does not ship with PyQt because of licensing issues. You will need to install that for yourself, then either set the ETSConfig.toolkit object like you showed, or use the environment variable approach:

$ export ETS_TOOLKIT=qt4

or

C:\ set ETS_TOOLKIT=qt4 

> Another example, to have the same "look" with Qt and WX for Color trait,
> you have to set style='custom' for WX and style='simple' for Qt...
>
>
> Cheers,
>
> PS: I never tested my code with Qt4 backend under Vista...
>

OK, got it running but there are lots of strange things happening (underying C++ objects being deleted etc etc.) so I'll stick with the wx backend.

Is there a Qt equivalent of IEHTMLEditor (wx/extras)?

I've got a few performance problems with the speed of plots/views coming up which may or may not be a wx issue but I'll ask about that in a separate post.

So thanks for the help. Good to at least get it running under Qt.

Brennan


_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev

_______________________________________________ Enthought-Dev mailing list [hidden email] https://mail.enthought.com/mailman/listinfo/enthought-dev


_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: wx vs Qt

Guy K. Kloss
On Mon, 24 Jan 2011 17:29:02 Brennan Williams wrote:
> OK, got it running but there are lots of strange things happening
> (underying C++ objects being deleted etc etc.) so I'll stick with the wx
> backend.

Under Windows there are often problems with native code libraries if they're
compiled with different compilers. Maybe one has been buildt using MSVC and
another one MinGW or Cygwin?

>  I've got a few performance problems with the speed of plots/views coming
> up which may or may not be a wx issue but I'll ask about that in a
> separate post.

I've seen (on Linux) much better performance on Qt in comparison to wx. But
that was about a year ago, so things might have changed, too.

HTH,

Guy


--
Guy K. Kloss
School of Computing + Mathematical Sciences
Auckland University of Technology
Private Bag 92006, Auckland 1142
phone: +64 9 921 9999 ext. 5032
eMail: [hidden email]

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: wx vs Qt

bryce hendrix-2
In reply to this post by Brennan Williams

On Sun, Jan 23, 2011 at 10:29 PM, Brennan Williams <[hidden email]> wrote:
OK, got it running but there are lots of strange things happening (underying C++ objects being deleted etc etc.) so I'll stick with the wx backend.

Is there a Qt equivalent of IEHTMLEditor (wx/extras)?

I've got a few performance problems with the speed of plots/views coming up which may or may not be a wx issue but I'll ask about that in a separate post.

So thanks for the help. Good to at least get it running under Qt.



What issues did you run into? In my experience, the PyQt4 backend occasionally has errors exiting, but PySide is pretty stable.

There isn't an equivalent of the IEHTMLEditor for qt. The IEHTMLEditor exists pretty much because the wx HTML editor is absolutely terrible. The Qt HTMLEditor is pretty good as is.

Bryce

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: wx vs Qt

Brennan Williams
On 24/01/2011 5:39 p.m., bryce hendrix wrote:

On Sun, Jan 23, 2011 at 10:29 PM, Brennan Williams <[hidden email]> wrote:
OK, got it running but there are lots of strange things happening (underying C++ objects being deleted etc etc.) so I'll stick with the wx backend.

Is there a Qt equivalent of IEHTMLEditor (wx/extras)?

I've got a few performance problems with the speed of plots/views coming up which may or may not be a wx issue but I'll ask about that in a separate post.

So thanks for the help. Good to at least get it running under Qt.



What issues did you run into?
Let me look into it a little bit more and come back with something slightly more useful than "strange things happening".

In my experience, the PyQt4 backend occasionally has errors exiting, but PySide is pretty stable.

What exactly is Pyside as opposed to PyQt4?
There isn't an equivalent of the IEHTMLEditor for qt. The IEHTMLEditor exists pretty much because the wx HTML editor is absolutely terrible. The Qt HTMLEditor is pretty good as is.

Is there a Qt HTMLEditor example?
Bryce
_______________________________________________ Enthought-Dev mailing list [hidden email] https://mail.enthought.com/mailman/listinfo/enthought-dev


_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: wx vs Qt

Chris Colbert


On Mon, Jan 24, 2011 at 12:00 AM, Brennan Williams <[hidden email]> wrote:
On 24/01/2011 5:39 p.m., bryce hendrix wrote:

On Sun, Jan 23, 2011 at 10:29 PM, Brennan Williams <[hidden email]> wrote:
OK, got it running but there are lots of strange things happening (underying C++ objects being deleted etc etc.) so I'll stick with the wx backend.

Is there a Qt equivalent of IEHTMLEditor (wx/extras)?

I've got a few performance problems with the speed of plots/views coming up which may or may not be a wx issue but I'll ask about that in a separate post.

So thanks for the help. Good to at least get it running under Qt.



What issues did you run into?
Let me look into it a little bit more and come back with something slightly more useful than "strange things happening".


In my experience, the PyQt4 backend occasionally has errors exiting, but PySide is pretty stable.

What exactly is Pyside as opposed to PyQt4?

PySide are LGPL python bingdings for Qt, written by Nokia (the owner of Qt). PyQt4 are GPL and Commercial python bindings for Qt, written by Riverbank Computing. 

There isn't an equivalent of the IEHTMLEditor for qt. The IEHTMLEditor exists pretty much because the wx HTML editor is absolutely terrible. The Qt HTMLEditor is pretty good as is.

Is there a Qt HTMLEditor example?

With Qt, you get webkit:

Bryce
_______________________________________________ Enthought-Dev mailing list [hidden email] https://mail.enthought.com/mailman/listinfo/enthought-dev


_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev



_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev