reflow/reflowctl/control_widgets.py

21 lines
738 B
Python
Raw Permalink Normal View History

# -*- coding: utf-8 -*-
from PyQt4 import QtGui, QtCore
class AddRemoveWidget(QtGui.QWidget):
def __init__(self, parent):
#super(AddRemoveWidget, self).__init__(parent)
QtGui.QWidget.__init__(self, parent)
self.add_button = QtGui.QPushButton(QtGui.QIcon.fromTheme("list-add"), "")
self.remove_button = QtGui.QPushButton(QtGui.QIcon.fromTheme("list-remove"), "")
sh = "QPushButton:disabled { background-color: #555555; }"
self.remove_button.setStyleSheet(sh)
self.add_button.setStyleSheet(sh)
self._layout = QtGui.QVBoxLayout(self)
self._layout.addWidget(self.add_button)
self._layout.addWidget(self.remove_button)
self._layout.addStretch(4)