w = ParameterTree()
pl = w.palette()
pl.setColor(w.backgroundRole(), QtGui.QColor('black'))
w.setPalette(pl)
w.show()--
You received this message because you are subscribed to the Google Groups "pyqtgraph" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyqtgraph+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyqtgraph/c779cd9f-b379-4ede-96c9-3d2d215396ff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
parameter_tree.setStyleSheet("""
QTreeView {
background-color: rgb(46, 52, 54);
alternate-background-color: rgb(39, 44, 45);
color: rgb(238, 238, 238);
}
QLabel {
color: rgb(238, 238, 238);
}
QTreeView::item:has-children {
background-color: '#212627';
color: rgb(233, 185, 110);
}
QTreeView::item:selected {
background-color: rgb(92, 53, 102);
}
""")I have not tried with ParameterTree specifically, but I would look at Qt's stylesheets:
On Sun, Jul 8, 2018 at 10:01 AM, Eugene E. <omeg...@gmail.com> wrote:
Hello!I am placing ParameterTree near the PlotWidget and woul like to apply a dark theme to the tree so it maches the default dark theme for PlotWidget. How do I set backgound and foreground color for ParameterTree instance?So far I found out about palette but it seems not to work for the items inside a tree:w = ParameterTree()
pl = w.palette()
pl.setColor(w.backgroundRole(), QtGui.QColor('black'))
w.setPalette(pl)
w.show()
Any suggestions how to affect the whole tree?
--
You received this message because you are subscribed to the Google Groups "pyqtgraph" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyqtgraph+...@googlegroups.com.
ptree1 = ParameterTree()
ptree1.setStyleSheet("""
QTreeView {
background-color: rgb(46, 52, 54);
alternate-background-color: rgb(39, 44, 45);
color: rgb(238, 238, 238);
}
QLabel {
color: rgb(238, 238, 238);
}
QTreeView::item:has-children {
background-color: '#212627';
color: rgb(233, 185, 110);
}
QTreeView::item:selected {
background-color: rgb(92, 53, 102);
}
""")
To unsubscribe from this group and stop receiving emails from it, send an email to pyqtgraph+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyqtgraph/7b5f1b3c-6c31-4c92-9c5b-aa277a096e0e%40googlegroups.com.
%gui qt5
from pyqtgraph.parametertree import (Parameter, ParameterTree)
parameters = [
{'name': 'signal',
'type': 'group',
'children': [ {'name': 'n', 'type': 'int', 'value': 0, 'readonly': True},
{'name': 'fc', 'type': 'float', 'value': 1, 'siPrefix': True, 'suffix': 'Hz', 'readonly': True},
{'name': 'ts', 'type': 'float', 'value': 2, 'siPrefix': True, 'suffix': 's', 'readonly': True}]
},
]
root_parameter = Parameter.create(name='params', type='group', children=parameters)
ptree1 = ParameterTree()
ptree1.setStyleSheet("""
QTreeView {
background-color: rgb(46, 52, 54);
alternate-background-color: rgb(39, 44, 45);
color: rgb(238, 238, 238);
}
QLabel {
color: rgb(238, 238, 238);
}
QTreeView::item:has-children {
background-color: '#212627';
color: rgb(233, 185, 110);
}
QTreeView::item:selected {
background-color: rgb(92, 53, 102);
}
""")
ptree1.setParameters(root_parameter, showTop=False)
ptree1.show()To unsubscribe from this group and stop receiving emails from it, send an email to pyqtgraph+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyqtgraph/8f61c4bf-f50f-4ec3-891a-abb01e77a704%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to pyqtgraph+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyqtgraph/1c64c4c0-46de-4b7a-b419-efbbd4e9b03a%40googlegroups.com.
pyqtgraph.parametertree.ParameterTree(parent=None, showHeader=True)To unsubscribe from this group and stop receiving emails from it, send an email to pyqtgraph+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyqtgraph/8c936b38-08b0-4777-98b6-894bb22f642b%40googlegroups.com.