Ignore:
Timestamp:
04/11/13 18:14:46 (12 months ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

Override the 'Quit' keyboard shortcut when a popup window is shown.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/OrangeCanvas/document/quickmenu.py

    r11420 r11462  
    2121    QStandardItemModel, QSortFilterProxyModel, QStyleOptionToolButton, 
    2222    QStylePainter, QStyle, QApplication, QStyledItemDelegate, 
    23     QStyleOptionViewItemV4, QSizeGrip 
     23    QStyleOptionViewItemV4, QSizeGrip, QKeySequence 
    2424) 
    2525 
     
    948948        FramelessWindow.keyPressEvent(self, event) 
    949949        event.accept() 
     950 
     951    def event(self, event): 
     952        if event.type() == QEvent.ShortcutOverride: 
     953            log.debug("Overriding shortcuts") 
     954            event.accept() 
     955            return True 
     956        return FramelessWindow.event(self, event) 
    950957 
    951958    def eventFilter(self, obj, event): 
Note: See TracChangeset for help on using the changeset viewer.