250 """ |
250 """ |
251 Public method to create an action. |
251 Public method to create an action. |
252 |
252 |
253 @param icon icon of the action (QIcon) |
253 @param icon icon of the action (QIcon) |
254 @param text text of the action (string) |
254 @param text text of the action (string) |
255 @param reference to the parent object (QObject) |
255 @param parent reference to the parent object (QObject) |
256 @return reference to the created action (QAction) |
256 @return reference to the created action (QAction) |
257 """ |
257 """ |
258 fm = QFontMetrics(self.font()) |
258 fm = QFontMetrics(self.font()) |
259 if self.__maxWidth == -1: |
259 if self.__maxWidth == -1: |
260 self.__maxWidth = fm.width('m') * 30 |
260 self.__maxWidth = fm.width('m') * 30 |