setEnabled(False) does not work on menu actions

Bug #876947 reported by Andrew G
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Unity
New
Undecided
Unassigned
unity (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

This is reported as a Qt-bug (link below), but was closed as it seems to be a bug in the Unity desktop (in both Ubuntu 11.04 and 11.10). As far as I can see it has not been followed up. Sorry I am not able to say exactly which package the bug is in.

https://bugreports.qt.nokia.com//browse/QTBUG-19499

See also:

http://developer.qt.nokia.com/forums/viewthread/6705

The bug prevents database program Qercus (Python + PyQt4) from working correctly with the Unity desktop.

http://kde-apps.org/content/show.php/Qercus?content=111504

Andrew.

Robert Roth (evfool)
affects: ubuntu → unity (Ubuntu)
Revision history for this message
Andrew G (andrewg47) wrote :

Example of non-working code:

class QercusApp(QtGui.QMainWindow):

    self.functionMenu = QtGui.QMenu(self.tr("F&unctions"), self)
    self.functionMenu.addAction(self.overviewAct)

    self.menuBar().addMenu(self.functionMenu)

    ## This line has no effect on Unity (but is ok on Kubuntu).
    self.functionMenu.setEnabled(False)

I will soon release program Qercus 0.23b2 - which will delete rather than disable unwanted entries in the menu bar. This looks neater anyway. So fixing this bug is not a priority for me.

Andrew.

Revision history for this message
Andrew G (andrewg47) wrote :

I spoke too soon - the bug applies not just to menu bar entries, but also to their drop down entries (i.e setEnabled(False) does not work on QAction objects). Qercus cannot be used reliably on Unity until this is fixed.

Andrew.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in unity (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.