[Matplotlib-users] Qt4 backend improvements

2007-11-09 Thread Martin Teichmann
Hi all,

I've looked a bit into the Qt4 backend and found some oddities
that might be interesting to change. The Qt4 backend
does not use the Qt4 facilities to create a toolbar but does
it on its own. I changed that and filed a patch at the sourceforge
patch site under patch request ID 1828848 (Qt4 backend improvement).

Working on that I also found a little bug, which I fixed in
patch request ID 1828813 (PyQt4 giving annoying error messages).

Greetings,

Martin



-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Qt4 backend improvements

2007-11-12 Thread Martin Teichmann
Hi,

> > There 
> > may be a reason it was done in the less straightforward way that aren't
> > obvious to you or I (perhaps to ease embedding... just guessing).
> 
> I don't think we can use the QMainWindow's addToolBar for this. It creates 
a 
> single toolbar for the entire window, but what if we want to add two 
> canveses, each with its own toolbar, in a single window? I am writing an 
> application that does this.

Well, technically this is not a problem, since you can add several toolbars
with addToolBar. But well, you are right, this would look awkward, two
times the same toolbar... But anyhow, I am calling addToolBar in the class
FigureManagerQT, which is not able to handle more than one plot in a 
window it seems to me (am I missing something?). If, on the other
hand, you create your own QMainWindow, there is no problem putting the
toolbar like it was done classically. I added an example for that to the
patch request ID 1828848 (Qt4 backend improvement). I don't know your
code, but it is possible, maybe even probable, that it works even
with my modifications, as I did not change the class structure.
Only possible incompatibilities I could see is if you are inheriting
FigureManagerQT and doing something in there.

So in the end I think my patch is still a good idea. It might be needed
to change it to keep compatibility with old code, though.

Greetings,

Martin




-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users