Highlighting parts of complex widgets in themes

Karl Vogel karl.vogel at seagha.com
Wed Dec 17 15:24:09 GMT 2003


>> I currently implemented this by installing an eventfilter on the
>> scrollbar that
>> also listens for mouse move events and then records the current mouse
>> position
>> within the widget. Then I issue a repaint and in the drawing code of
>> the Primitive Element, I check if the recorded mouse position is
>> within the element.
>>
>> In order to receive the mouse move events, I had to enable mouse
>> tracking on the
>> widget, which I actived in the polish method of the style.
>>
>> While this works, I'm wondering if there isn't a better way to do
>> this.. as this
>> feels kind of hackish and would mock things up if the application
>> changes the
>> tracking state.
> 
> I'd take a look at the docs for QStyle::styleFlags ;)
> 
> -anders

Which I already did ;)

--
CC_ScrollBar(const QScrollBar *)

 Style_Enabled 	Set if the scrollbar is enabled. 	 Unused. 	  
 Style_HasFocus 	Set if the scrollbar has input focus.
--

Only those 2 are supported for a CC_ScrollBar. 

There is no Style_MouseOver for PE_ScrollBarXXXX, which is what would be 
needed.

(Going by the docs on http://doc.trolltech.com/3.2/qstyle.html )









More information about the kde-core-devel mailing list