PDA

View Full Version : triangular and rouned buttons



kenouz1234
6th March 2010, 19:12
Hello,

please how I can create rectangualars an rounded buttons with Qt 4.6.2 and put them like this:

http://img242.imageshack.us/img242/7176/5boutons.jpg

thank you very much

squidge
6th March 2010, 19:24
How about subclassing QAbstractButton? or perhaps QPushButton and overriding the virtual paint method? You'll need to provide a new hittest method as well I would think so Qt knows when the button is clicked.

kenouz1234
6th March 2010, 20:45
please can you make me an example?
I would like to insert theses 5 buttons into a resizable widget (with QLayout)

lyuts
7th March 2010, 10:22
Take a look at Qt's Pie menu (http://qt.nokia.com/products/appdev/add-on-products/catalog/4/Widgets/qtpiemenu).

aamer4yu
7th March 2010, 10:34
I guess the embedded widgets 5 way button fits your requirement,.
Have a look at embedded widgets source code (http://qt.nokia.com/files/embedded-widget-demos/qt-embedded-widgets-source-and-documentation/view)