4

スライダーの背景をペイントしたい。これを試してみましたが、スライダー全体が色で覆われています。これはQSliderの継承されたクラスにあります

void paintEvent(QPaintEvent *e) {
  QPainter painter(this);
  painter.begin(this);
  painter.setBrush(/*not important*/);

  // This covers up the control. How do I make it so the color is in
  // the background and the control is still visible?
  painter.drawRect(rect()); 

  painter.end();
}
4

1 に答える 1