Hi

I’m using “drawControl” case “CE_PushButton:” to draw a button and now I want to show the button text and align it to the right, but I can’t…

I hope somebody can help me, thanks

Qt Code:
  1. case CE_PushButton:
  2. ... some code ...
  3. painter->setRenderHint(QPainter::Antialiasing, true);
  4. if(option->state & State_HasFocus)
  5. painter->setPen(QPen(QColor::QColor(204,255,0),1,Qt::SolidLine, Qt::RoundCap));
  6. else
  7. painter->setPen(Qt::NoPen);
  8. painter->setBrush(gradient);
  9. painter->drawRoundRect(roundRect, cx, cy);
  10.  
  11. break;
To copy to clipboard, switch view to plain text mode