Page 1 of 1

Somethig about setEnabled(false) ?

Posted: Wed Apr 27, 2011 03:03
by ogre2012
I have create a window which type is "Slider". And I want to this window can't receive any event from mouse cursor. So i use the "setEnabled(false)".
Maybe it make the function true successfully. But I find that the colour of the window become dim.

How to keep the original colour if I want to use the "setEnabled(false)"?
Or can you tell me another way that the window can't receive any mouse course's event?
Thank you very much!

Re: Somethig about setEnabled(false) ?

Posted: Thu Apr 28, 2011 02:42
by ogre2012
ogre2012 wrote:I have create a window which type is "Slider". And I want to this window can't receive any event from mouse cursor. So i use the "setEnabled(false)".
Maybe it make the function true successfully. But I find that the colour of the window become dim.

How to keep the original colour if I want to use the "setEnabled(false)"?
Or can you tell me another way that the window can't receive any mouse course's event?
Thank you very much!


I have solved this problem.I create another child window which has the same size with the parent window.And the child window is 'blank' image . Such as :
mNoneLabel is StaticImage type.
mNoneLabel->setProperty(_T("UnifiedAreaRect"),_T("{{0.0,0},{0.0,0.0},{1.0,0.0},{1.0,0.0}}"));
mNoneLabel->setProperty(_T("Image"), _T(""));

So the parent window can't receive any event from mouse cursor.