PDA

View Full Version : How to create custom styled widgets ???



hgedek
2nd October 2011, 18:46
Well while looking into google maps I realize that :

- On map there are focus in out or move/turn buttons or widgets ... they may be transparent or visible/invisible according to mouse move ...
also their shapes are custom - not bordered etc....now I want to add these type controls on my mdiarea ...

where should i start from ?
any ideas ?

Lykurg
2nd October 2011, 20:44
Use a normal QWidget, do all the painting yourself, set an transparent background etc. (also you could have a look at QWidget::setMask()). Further use the mouse event handlers to detect clicks and hovers. Do the painting according to these states.

And what is in your mdiarea you would like to provide such a functionality? If it is a QGraphicsView then you can do the control easier with customized QGraphicsItem.

hgedek
3rd October 2011, 23:58
There is qglwidget mdisubwindows in mdiarea...i wished to focus on/out or turn left/right type operations implemented some cool widget like theses...

now i will look for these things you told me...

thanks , i wll try them..