can we place a widget over a pushbutton
-
I want to place a QCustomplot widget over a pushbutton , and i want to highlight the pushbutton when pressed over the widget . This is an unique requirement kindly help in solving this problem. Or can we make the transparent and when the transparent button is i want to highlight the border of pushbutton , Is this possible ?
-
I want to place a QCustomplot widget over a pushbutton , and i want to highlight the pushbutton when pressed over the widget . This is an unique requirement kindly help in solving this problem. Or can we make the transparent and when the transparent button is i want to highlight the border of pushbutton , Is this possible ?
What do you expect from doing this?
I think, the plot is larger than the button, so it would hide the button completely.
If it's all about the button press / click event, you could use the mousePress-Event from your QCustomPlot instead.
-
What do you expect from doing this?
I think, the plot is larger than the button, so it would hide the button completely.
If it's all about the button press / click event, you could use the mousePress-Event from your QCustomPlot instead.
-
@pl45m4 actually i will be have three to for such widget, My requirement is that i want to highlight the widget which is being selected by the user
@maniron28 said in can we place a widget over a pushbutton:
My requirement is that i want to highlight the widget which is being selected by the user
"Selected" in which way? You dont need a PushButton for this. You can draw a border around your widget (with stylesheet for example).
-
Set the pushbutton to be the parent of your widget. See if that adds the widget onto your pushbutton.
-
You can set the parent of your object or widget with the constructor.
https://doc.qt.io/qt-5/qwidget.html#QWidget
take a second to read what the constructor says about the parent argument.MyWidget *myWidgetPtr = new MyWidget(pushBtnPtr);