1

I'm using TraitsUI in Python to create applications, and noticed that the UI disappears on a Mac 10.8, looks great on Ubuntu 10.04, and is somewhere in between for Ubuntu-Mate 14.04 (ie small view discrepancies)

Here is the Mac image

Here is the Ubuntu Mate image

This is using the latest version of traits=4.5.0 on both computers and traitsui=4.4.0. Any ideas, if not why this is happening, in which package or component of traits/traitsui the issue might reside?

Thanks.

PS the plot is not missing from the first screenshot, I just deleted it so that's not part of the bug.

Adam Hughes
  • 14,601
  • 12
  • 83
  • 122
  • Wx, PySide, or PyQt? (Either in code or in ETS_TOOLKIT and QT_API env vars, per system). – Jonathan March Jan 06 '15 at 02:07
  • 1
    I haven't changed any of those backend settings. Is there a preferrable setting? Sorry, not quite clear what you are suggesting – Adam Hughes Jan 06 '15 at 18:48
  • What are these settings? Are you sure that they are the same on all 3 systems? In general, from the command line, Wx is default but Qt/PySide is best supported. E.g. it looks like you are using Mayavi, and I would not be confident a priori that the latest Mayavi was as well tested with Wx as with Qt – Jonathan March Jan 06 '15 at 20:43
  • It does seem to be related to these settings. When I update wx, qt and pyside to the latest versions, now I also get the strange behavior. I'm going to make a clean virtual environment. If I just installed for example, QT, then maybe it will work? Also, the mayavi part is least important, I can cut it. – Adam Hughes Jan 06 '15 at 21:09
  • I would start by explicitly specifying env vars ETS_TOOLKIT=qt4, QT_API=pyside. If you still have a bug with this and can isolate some minimal code that exhibits the bug, worth reporting to enthought support. – Jonathan March Jan 06 '15 at 21:14
  • Hey Jonathan. Looks like wxpython is the problem. I'm going to try to use an older version. Do you have any links to pages that talk about these environmental variables anywhere? I'd like to understand them better. Seems like they aren't set at all in my environment. – Adam Hughes Jan 06 '15 at 21:36
  • 1
    Any update on this? I still get this in OSX 10.10 with Anaconda TraitsUI. I don't know how to get rid of the black parts. – Griff Feb 25 '16 at 05:45

1 Answers1

1

Converting chat to answer:

The discrepancy was due to differences in installed GUI backend toolkit versions. There are two main backends available in TraitsUI: The newer Qt is more performant, OO, full-featured, and attractive, which is why it is the default within Canopy. The older Wx is still the default at the command line for legacy reasons. There are two wrappers for Qt: pyside and pyqt. We recommend and use pyside for licensing reasons (and provide it for free, unlike pyqt).

The backend can be specified either in code or by setting environment variables at the command line. See Toolkit Selection and Integrating in a Qt application and VTK/Mayavi on Mac OS X.

Jonathan March
  • 5,800
  • 2
  • 14
  • 16
  • Thanks. Just to clarify, my solution was to uninstall WX 3.0.0 (while changing the backend should work too). If an older version of WX magically works, I will fill out an issue on GH – Adam Hughes Jan 06 '15 at 22:20
  • Yes, ETS has not yet been adapted to Wx 3.x, which is not even available in Canopy yet. – Jonathan March Jan 06 '15 at 22:27
  • Jonathan, I have verified that pyside and pyqt both give me the same behavior and have outlined the problem in an issue: https://github.com/enthought/traitsui/issues/192 I will try to update the issue later with screenshots showing where qt is not rendering objects correctly, or as nicely as wx 2.10 did. – Adam Hughes Jan 21 '15 at 16:48