views:

397

answers:

3

Hi i am having one videoeditor view and one progressbar is there with blue color . But how i will change the progressbar color to red when i clicked trim start and it will return to blue when i will click the trim endbutton in QT

+3  A: 

This is from the Qt Documentation

You can style the ::chunk part explicitly to change background color.

Rupert Jones
thanks a lot...
Latha
but the thing is that the whole color of the progressbar is etting changed and i need the color should change when i clicked the start button chane to previous color when i clicked the end button.
Latha
@Latha: You can change the color dynamically? What do you mean. two colors at once, or a color depending on the current state of the program? Take a look at the function `QWidget::setStyleSheet`
Rupert Jones
A: 

yes i want two color in it.

Latha
since this is not really an answer to your question (it seems that this was by mistake) I suggest to remove this answer.
Rupert Jones
A: 

EDIT: I misunderstood the question. You are talking about something like the clip selector/editor in Adobe Premiere. To do something like this I would just create a custom widget, and handle the drawing yourself. It would not be too hard. You will need to subclass QWidget, then reimplement the paintEvent(), then also probably the mousePressEvent(), mouseReleaseEvent(), and mouseMouseEvent().

JimDaniel