Hi,
I have created a custom widget which will be drawn in parent widget. There can be number of custom widget drawn in parent widget(using mouse). To draw all the custom widget in parent widget, I am using following code
for(int iter = 0; iter < count; iter++)
{
option1.initFrom(m_List->at(iter));
m_List->at(iter)->show();
style
()->drawPrimitive
(QStyle::PE_Widget,
&option1,
&p,
this);
}
for(int iter = 0; iter < count; iter++)
{
QStyleOptionFocusRect option1;
option1.initFrom(m_List->at(iter));
m_List->at(iter)->show();
style()->drawPrimitive(QStyle::PE_Widget, &option1, &p, this);
}
To copy to clipboard, switch view to plain text mode
here m_List is QList contains all the custom Widget.
But i am facing a problem with focus. if I draw 5 custom widget , only lat drawn widget will be active. I cannot do nothing on other 4 custom widget.
Can any one tell me how can i resolve this issue.???
Thank You
Bookmarks