1

Qt supports custom paint events for drawing of widgets through QStyle. However when using the QStyle you need to specify what type of element you're trying to draw, i.e, if you want a control element you need to paint it by using QStyle.drawControl(CE_Example, style).

My question is, how is someone who is relatively new meant to understand which method to correctly call, or find which element to paint when I want to perform the actions myself, say for example I want to draw my SpinButton with purple up and down arrows. I tried to google and see if I could find an explanation but could not, so I was wondering if this is common terminology or if it was some jargon used by the Qt community.

Any advice for correctly traversing documentation or anything like that appreciated, maybe I have an incorrect approach.

eyllanesc
  • 235,170
  • 19
  • 170
  • 241
user12388651
  • 179
  • 1
  • 8

1 Answers1

0

I eventually found my answer traversing https://doc.qt.io/qt-5/qstyle.html#details

  • Primitive Element: A primitive element is a common GUI element, such as a checkbox indicator or button bevel.

  • Control Element: A control element is a part of a widget that performs some action or displays information to the user.

  • Complex Control: Complex controls have different behavior depending upon where the user clicks on them or which keys are pressed.

eyllanesc
  • 235,170
  • 19
  • 170
  • 241
user12388651
  • 179
  • 1
  • 8