开发者

how to add the Phonon::SeekSlider to horizontalSlider in qt

开发者 https://www.devze.com 2023-03-04 07:56 出处:网络
I have added an ho开发者_开发问答rizontal slider on UI and i need to use this as slider in phonon audio player

I have added an ho开发者_开发问答rizontal slider on UI and i need to use this as slider in phonon audio player i used an onClick function in an button and added an

Phonon::SeekSlider *slider = new Phonon::SeekSlider; 
slider->setMediaObject(moo);
 slider->show();

if i used this the slider is opening as another window .how can i map the horizontal i use it in UI to this seek slider in qt


You create the slider without a parent. As the documentation states "Any QWidget that has no parent will become a window". So when you create the slider make sure you set its parent QWidget, which will be one of the widgets in your UI.

From your question I make up you're already using a slider in your UI? Then simply don't use that one, but use the SeekSlider instead.

0

精彩评论

暂无评论...
验证码 换一张
取 消