Changeset 11345:6c8aefcddebd in orange


Ignore:
Timestamp:
02/21/13 15:01:09 (14 months ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

Changed ToolGrid base class to QFrame (so it can support css box model).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/OrangeCanvas/gui/toolgrid.py

    r11177 r11345  
    99 
    1010from PyQt4.QtGui import ( 
    11     QWidget, QAction, QToolButton, QGridLayout, QFontMetrics, 
     11    QFrame, QAction, QToolButton, QGridLayout, QFontMetrics, 
    1212    QSizePolicy, QStyleOptionToolButton, QStylePainter, QStyle 
    1313) 
     
    109109 
    110110 
    111 class ToolGrid(QWidget): 
     111class ToolGrid(QFrame): 
    112112    """A widget containing a grid of actions/buttons. 
    113113 
     
    121121    def __init__(self, parent=None, columns=4, buttonSize=None, 
    122122                 iconSize=None, toolButtonStyle=Qt.ToolButtonTextUnderIcon): 
    123         QWidget.__init__(self, parent) 
     123        QFrame.__init__(self, parent) 
    124124 
    125125        if buttonSize is not None: 
     
    219219            before = actions[before] 
    220220 
    221         return QWidget.insertAction(self, before, action) 
     221        return QFrame.insertAction(self, before, action) 
    222222 
    223223    def setActions(self, actions): 
     
    255255 
    256256    def actionEvent(self, event): 
    257         QWidget.actionEvent(self, event) 
     257        QFrame.actionEvent(self, event) 
    258258 
    259259        if event.type() == QEvent.ActionAdded: 
     
    370370                    return True 
    371371 
    372         return QWidget.eventFilter(self, obj, event) 
     372        return QFrame.eventFilter(self, obj, event) 
    373373 
    374374    def __focusMove(self, focus, key): 
Note: See TracChangeset for help on using the changeset viewer.