c++ - Can I add padding to a QwtText object? -
i adding qwtplotmarker qwtplot using following code:
qwtplotmarker *tooltip = new qwtplotmarker(tr("tooltip")); qwttext label("02/01/17\n06:00:00\nvoltage: 4.02"); qcolor blue(qcolor(30, 140, 220)); label.setcolor(blue); label.setborderpen(qpen(blue, 1)); label.setborderradius(5); label.setbackgroundbrush(qcolor(65, 177, 225, 50)); qfont font("ms shell dlg 2", 8); label.setfont(font); tooltip->setlabel(label); tooltip->setlabelalignment(qt::aligncenter | qt::aligntop); tooltip->attach(this); this->replot(); where this points qwtplot object.
with code above i'm getting following result:
note in image letter v voltage overlapped border.
is possible add padding qwttext (or maybe qwtplotmarker!?), can result following one?
i'm using qt 5.3.2 , qwt 6.1.0.


Comments
Post a Comment