Hi Peppe,

that should do the trick.

void setProgress(UInt32 p)
{
     // p is the progress in percent.
     // update the qt progress bar.
     // ...
     qApp->processEvents();
}

SceneFileHandler::the().setReadProgressCB(setProgress, false);

Andreas

> Dear all,
> can someone say to me what I have to do in order to use a Qt Progress 
> Bar that shows progression during the loading of dataset? I'm devoloping 
> an application using OpenSG and Qt. My problem is that in my application 
> I use very huge datasets (.vrlm), and OpenSG (OSG::SceneFileHandler 
> class) needs more than 5 minute to load them. So I would like to update 
> the Qt GUI interface during the loading (now the 
> OSG::SceneFileHandler.the().read(...) method freezes my GUI, appearing 
> such as a computer dead-lock) and also to use a progress bar that shows 
> to the user the time remaining for the complete load of the dataset (and 
> that says that the program has not blocked).
> 
> What I have to do?
> 
> Thanks in advance,
> peppe
> 
> _____________________________________________________
> 
> 
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Opensg-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/opensg-users
> 
> 


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to