Important: Please read the Qt Code of Conduct -

QPushButton move icon to left and center text with paintEvent(...)

  • Hello, I am interested can I move a QPushButton icon to the left of the button while preserving the text centered in overriding the paintEvent(QPaintEvent*) method? I could not find any good example of doing so? If that is not possible, shall I just derive a QWidget ?


  • Hi! As you've marked the thread as solved it would be nice if you could share your solution with the other users :)

Log in to reply