Hello Friends,
I want round shaped pushbutton.
Help me.
Thanks for help in advance,
Thank You,
Manohar
Hello Friends,
I want round shaped pushbutton.
Help me.
Thanks for help in advance,
Thank You,
Manohar
What did you try so far?
I used masking to create round shaped buttons .................
If button is in disabled state, border around button is not continous .......
I want solution to make border of button to be continues ......
I hope you got what I have written above ........
Thank You,
Manohar
What do you mean the border is not continous? Did you reimplement the button's paintEvent?
If you would use Qt 4.4, you could easily style a button using a stylesheet and the border-radius property to make the corners of your button round.
Is there any reason why you're staying with Qt3?
Customer Requirement ..........
So what about the paintEvent?
I am not getting ...
If you give some code sample , I will try.
Thank You,
Manohar
If you don't tell the button it should paint itself round, you can't expect it to be round. Masking only makes some regions of it transparent, but it won't look good if you just cut holes in a regular push button.
I called drawButton() in Widget's paintEvent()
Following error occurs
error: ‘virtual void QPushButton::drawButton(QPainter*)’ is protected
How to resolve it ? Please help me
Thank You,
Manohar
You need to implement your own routine for drawing the button. Are you aware of what I'm telling you or are you just guessing? You need to draw a round button because the button is not round by default, so masking it will not make it round because it's rectangular.
Thanks ........
I am not getting what to write in DrawButton() slot to make round button....
If you give some hints .... I will try ...
Don't touch DrawButton()! Reimplement paintEvent(). There are lots of examples on how to do that in the docs.
Qt Code:
p.drawEllipse(rect()); }To copy to clipboard, switch view to plain text mode
I already reimplement paintEvent() in widget class ....
Its not working ....
You must have done it incorrectly then.
Please help me to correct that mistake ......
Thank You,
Manohar
Bookmarks