PySide Bugzilla Closed for New Bugs

PySide is now a Qt Add-on and uses the Qt Project's JIRA Bug Tracker instead of this Bugzilla instance. This Bugzilla is left for reference purposes.

Bug 1061 - Describe PySide.QtGui.QAction constructor in more detailed way
: Describe PySide.QtGui.QAction constructor in more detailed way
Status: NEW
Product: PySide
Classification: Unclassified
Component: Documentation
: HEAD
: PC Other
: P4 enhancement
Assigned To: Hugo Parente Lima
:
:
:
  Show dependency treegraph
 
Reported: 2011-11-16 18:23 EET by Vladimir Rutsky
Modified: 2012-03-08 16:57 EET (History)
9 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Rutsky 2011-11-16 18:23:43 EET
All that documentation says about "non-standard" constructor in PySide QAction
implementation [1] is:

> A PySide.QtGui.QAction may contain an icon, menu text, a shortcut, status text, “What’s This?” text, and a tooltip. Most of these can be set in the constructor. 

Which is insufficient description for understanding that it is possible to
write as in [2]:

self.cutAct = QtGui.QAction(QtGui.QIcon(':/images/cut.png'), "Cu&t",
                self, enabled=False, shortcut=QtGui.QKeySequence.Cut,
                statusTip="Cut the current selection's contents to the
clipboard",
                triggered=self.textEdit.cut)

Please add some examples to documentation about convenient usage of QAction
constructor.

[1] http://www.pyside.org/docs/pyside/PySide/QtGui/QAction.html
[2]
https://qt.gitorious.org/pyside/pyside-examples/blobs/master/examples/mainwindows/sdi/sdi.py
Comment 1 Vladimir Rutsky 2011-11-16 18:36:37 EET
P.S. Also it would be better to rewrite examples in documentation with using of
new-style Signals/Slots.
Comment 2 Hugo Parente Lima 2012-01-06 00:33:18 EET
If you have time you can help us translating the examples to the new
signal/slot syntax, they can be found in the directory "doc/codesnippets" of
PySide.

just grep for QAction.
Comment 3 Matti Airas 2012-03-08 16:57:22 EET
PySide is now a Qt-addon and uses Qt Project's JIRA tool for tracking bugs.
Please verify that the bug is still valid and re-submit it in the address
below:

https://bugreports.qt-project.org/

Sorry for the inconvenience!