qt - I cant paint QVideoWidget with QPainter -


i trying draw strings while have video palying, subtitle... have phonon::qvideowidget, in constructor do:

painter = new qpainter(this); 

and have overrided paint event this, test:

void myvideowidget::paintevent(qpaintevent* event) {     painter->drawline(0, 0, 1, 1);     //painter-> shows } 

so when start player see nothing qpainter did, normal video playing ideas?

it more common make qpainter local instance in paintevent() function.

qpainter painter(this); 

this results in begin() , end() methods being called automatically. these necessary qpainter work correctly. try calling them manually in paintevent() see if makes difference.

another thing might try overlaying text on video create qlabel in code , make video widget parent. not require sub classing video widget or overriding paint event.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -