> void wait(double seconds){
> clock_t end_wait;
> end_wait = clock () + end_wait * CLOCKS_PER_SEC ;
> while (clock() < end_wait) {}
> }
>
> for(int i=1; i<=max_time; i++){
>
> wait(1); //Waits one second
>
> myProgressBar.set_fraction(i/max_time); //it updates the
> GUI until it has returned to the main window loop
>
> while(Gtk::Main::events_pending()) //this should update
> the progress bar in GUI on each iteration in this for statement, but it
> doesn't
>
> Gtk::Main::iteration();//I tried both arguments, false
> and true, none of them worked, same result... it gets updated when it
> exits the function that uses this for statement
> }
You should put the Gtk::Main::iteration() inside the while loop:
while(Gtk::Main::events_pending())
{
Gtk::Main::iteration();
}
_________________________________________________________________
Με το Windows Live, μπορείτε να οργανώνετε, να επεξεργάζεστε και να μοιράζεστε
τις φωτογραφίες σας.
http://www.microsoft.com/hellas/windows/windowslive/products/photo-gallery-edit.aspx_______________________________________________
gtkmm-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtkmm-list