I am creating a program that draws graphs; I want to be able to have a button that a user can press to choose the line color and style. I want to be able to visually show what the current selection is.
Currently, I know that I can do that using two seperate widgets, a QPush button, and then a widget I make myself that just draws a line across it using QPen.
I would like to turn these two widgets into a single widget. I want this widget to be a pushable "button" that the user presses and I can get a signal out of to run a routine that sets a new QPen.
Is this functionality built in? Or would I need to create a new widget that re-implements either QPushButton or QActionButton? Or should I just make my widget which listens to mouseclick events on it and create a signal slot from there?