Ignore:
Timestamp:
05/15/13 16:58:00 (11 months ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

Handle QFileOpenEvent request events.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/OrangeCanvas/application/application.py

    r11125 r11522  
    66from PyQt4.QtGui import QApplication 
    77 
    8 from PyQt4.QtCore import Qt 
     8from PyQt4.QtCore import Qt, QUrl, QEvent, pyqtSignal as Signal 
    99 
    1010 
    1111class CanvasApplication(QApplication): 
     12    fileOpenRequest = Signal(QUrl) 
     13 
    1214    def __init__(self, argv): 
    1315        QApplication.__init__(self, argv) 
    1416        self.setAttribute(Qt.AA_DontShowIconsInMenus, True) 
     17 
     18    def event(self, event): 
     19        if event.type() == QEvent.FileOpen: 
     20            self.fileOpenRequest.emit(event.url()) 
     21 
     22        return QApplication.event(self, event) 
Note: See TracChangeset for help on using the changeset viewer.