On 4/11/08, Ulrich Berning <[EMAIL PROTECTED]> wrote:

>  From the docs:
>  "Actions are added to widgets using QWidget::addAction(). Note that an
> action must be added to a widget before it can be used; this is also true
> when the shortcut should be global (i.e., Qt::ApplicationShortcut as
> Qt::ShortcutContext)."

>  Add the line
>   self.addAction(self.action)
>  and it works.

Thanks (both Ulrich and Mark), that's it!
I re-read that part of the docs at least twice, and still didn't
notice that :(. And the book I'm using adds the action to a
toolbar/menubar, no mention of what to do when the application has
neither.

Btw, is there any difference using QAction over QShortcut, for
applications that don't have toolbar/menubar?

-- 
Mosor
_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to