'nuther woooohoooo!...I got a button!, lol...
A button in the first column of a TreeView on startup..

Unfortunately, it's not a PushButton, so it's not "pushing", lol...
but surely that's something I'm overlooking....but apparently
QStyleOption has no "PushButton",....but maybe I need to
pass an argument type when declaring,...

class DabDelegate(QStyledItemDelegate):

    def __init__(self, parent=None):
        super(DabDelegate, self).__init__(parent)

    def paint(self, painter, option, index):
        if index.column() == 0:         # Thumbnail
                parent   = self.parent()
                button = QStyleOptionButton()
                button.rect = option.rect
                QApplication.style().drawControl(QStyle.CE_PushButton, button, 
painter)

        else:
                QStyledItemDelegate.paint(self, painter, option, index)






      
_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to