[Solved]painting a widget inside a subclass of QAbstractButton

  • Can I set a custom widget to display inside a QAbstractButton.. if yes then where do i put it.. in the constructor and set the parent as "this", then i guess i dont need to do anything in paintEvent() assuming i dont need to draw borders, etc...

    or is it better to implement mouse press event in my widget directly..
    then in this case how do i paint it to highlight in the same way as a normal push button would do?? (ie the native highlighting scheme of buttons pressed-- that depends on the theme etc)..


  • inheriting from QPushButton did the job.. ;)

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.