Hi,

On Mon, Feb 13, 2012 at 6:02 AM, Dmitriy Igrishin <dmit...@gmail.com> wrote:

>
> Hmm, you don't need to call WMenuItem::createItemWidget() in
> YourMenuItem::createItemWidget(). Just create WAnchor, call
> WAnchor::setImage() and return it.
>

Yup, that solved it. For those interested,
https://gist.github.com/1812531/eaefc6ed7aaa27bf36e8fb20866fa09d2b6d4362


> It seems, that you don't even need to override
> WMenuItem::updateItemWidget() in you case becase
> IMO the default impl. will serve fine for you.
>

Can't use default impl because it asks for internal widget (not
containerWidget). Had to get contents->widget(0) before updateItemWidget.

Code is working for my needs, but you settings  item->setDisabled(true)
will crash. It's easy to solve (check for isDisabled in my local overload),
but
I'm lazy enough to have it this way for now. :)


Thank you very much!
Felipe
------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
witty-interest mailing list
witty-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to