我试图通过子类化和重写QPUshButton来定制一个paintEvent。我正在写课文,下面是图标:
paintEvent(QPaintEvent *paint)
{
QStyleOption opt;
opt.init(this);
QPainter p(this);
//Draw the base
style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this);
//Draw the text
我有一个容器,它有一个文本列表和每一行对应的图标。我不能让文本对齐,左对齐,图标对齐极右。此外,图标是基于文本长度的水平导向。我已经将文本和图标分开,使用div作为它们自己的独立身份。
下面是我使用的CSS属性:
chartInputSymbols: { // this is the class I use for the text
overflow: "auto",
float: "right",
},
circlePlus: { //this is the class I will be using f