> The @auto nodes are a nice touch. If you, Ville, change the qt_main
> files, please remove the File menu and its actions. That way I won't
> have to disable it by hand again.
Done.
> Now it is time for me to read, read, read the Qt docs.
If you want something to print, you can download "C++ GUI Programming
with Qt 3" at:
http://www.informit.com/content/images/0131240722/downloads/blanchette_book.pdf
It's largely valid for Qt4 as well.
--
Ville M. Vainio
http://tinyurl.com/vainio
- All the creation & destruction stuff
- Splitter and scrollbar stuff
- All the low level stuff leoQtTree
- etc etc
I suppose they will be removed or replaced with no-ops?
> A bit of googling reveals that there are even Python-oriented books
> about using Qt.
> For example:
>
> http://www.qtrac.eu/pyqtbook.html
Yeah, for money. Luckily, the C++ books/docs are perfectly applicable
to PyQt as well, since it's the same API (just convert -> to . and
remove type declarations, and you are pretty much there).
This happened because the icon paths were broken. Fixing.
> It would be convenient if you would allow me to revert your changes to
> qt_main. My code wants to have a menu bar already allocated, and
> there is no longer any reason to have "by hand" menu items. When my
> code is pushed you can insert whatever menu items you like in
> leoSettings.leo!
>
> It this ok with you?
It's ok. Once I pull, I can re-generate the ui stuff so that I just
allocate the menu, but don't leave any menu items.
>> The stuff that creates most widgets will be removed.
>
> I should say a few more happy words about this. It is a *huge*
> improvement to separate the gui-creation stuff from the adapter
> classes. For example, leoQtMenu needs only to set
I'm happy to hear that you share my thoughts on this. I was coming up
with a mild rash from the thought that model/engine would be
instantiating and configuring concrete GUI objects...
Additional rationale: we can dump clickable links to log that select a
leo node specified as url. This is particularly cool e.g. for search
results, error messages etc.
> > I just added QTextBrowser to log panel. It will allow users to put
> > all kinds of cool stuff to log as html (images, rich formatting,
> > hyperlinks etc):
>
> Additional rationale: we can dump clickable links to log that select a
> leo node specified as url. This is particularly cool e.g. for search
> results, error messages etc.
Will you be back porting to the Tk interface? ;-) Just kidding.
Although, come to think of it, someone demoed a tk-html pane a while
back.
Cheers -Terry
I don't see this at present. There were some problem with launchpad
yesterday. Did you ever actually up this. Or maybe there was a
reversion?
The present leoQtLog class creates tabs programmatically. It would be
easy to use a QTextBrowser instead of the QTextEdit object. The
selectTab method creates the tabs. Feel free to make this change if
you like: you would also have to modify the put and putnl methods of
the leoQtLog class.
Edward
> Will you be back porting to the Tk interface? ;-) Just kidding.
I guess I don't understand the joke. The gui plugin interface is what
I'm porting to. There are some hooks in various places that work
around, for example, the weird Tk text indices. These hooks are do
nothings for wx and qt text widgets.
> Although, come to think of it, someone demoed a tk-html pane a while
> back.
The qt gui plugin, or any other gui plugin, is free to do *anything*
provided that it implements the interface in the gui base classes in
leoPy.leo. You'll see this in action in the next few days.
Let's step back and see the big picture. In essence, the gui plugin
does three main tasks:
1. Creates Leo's window.
2. Handles events, and calls methods of Leo's core.
3. Handles calls from Leo's core to manage gui elements.
There has been considerable discussion of task 1. Yes, it's nice that
QtDesigner does some of the work cleanly, but by no means can it
possibly do all the work. For example, tabs can be created
dynamically, as can body pane editors.
As I write this, however, it see that it would be helpful if Ville
could create the 'Log','Find' and 'Spell' tabs in QtDesigner.
Anyway, the bulk of the problems typically arise in tasks 2 and 3.
That's where we'll see how capable the body and tree widgets are.
Edward
> As I said in another comment, this doesn't get to the heart of the
> matter. The gui must create tabs and body editors programmatically.
> Perhaps QtDesigner can help, but no static tool can do all the work.
> There is no substitute for substantial code in the various leoQtX
> classes. There is no free lunch.
As I said, dynamic creation of tabs is easy, so no worries about that.
Regarding free lunch, I feel that Python and Qt are all about free
lunch ;-)
Screenshot attached ;-)
Drool.
>>> I just added QTextBrowser to log panel.
Very cool.
I'd like to be able to switch between QTextBrowser and QScintilla in
the body pane. The leoQtBody interface to the core makes this easy:
just implement the interface for QTextBrowser instead of QScintilla.
Of course, the body then has to be created in program rather than just
in QDesigner. But in fact, we have to do that anyway to support the
two orientations for Leo windows.
Edward
> I'd like to be able to switch between QTextBrowser and QScintilla in
> the body pane. The leoQtBody interface to the core makes this easy:
> just implement the interface for QTextBrowser instead of QScintilla.
>
> Of course, the body then has to be created in program rather than just
> in QDesigner. But in fact, we have to do that anyway to support the
> two orientations for Leo windows.
It can be done with QStackedLayout. It's something I wanted to do as
well - people may sometimes want to edit rich text in leo, for
example. However, we really want QTextEdit, since that's editable.