How can I call int pos in main function.
Your question is not clear to me some how.
if you want slider position, useand you have a current change value with the help of onValueChanged(int value) // value is the current slider value
If you want current slider value in some other place, have a public function in mainwindow which return ;
And call this where ever you want main/some other class where you have this mainwindow handle.
i don't know what your doing with this code
void MainWindow::onValueChanged(int value)
{
int pos = slider->sliderPosition();
value=pos; //what are doing here, why are you overwriting value
//.................
}
void MainWindow::onValueChanged(int value)
{
int pos = slider->sliderPosition();
value=pos; //what are doing here, why are you overwriting value
//.................
}
To copy to clipboard, switch view to plain text mode
Bookmarks