Reputation: 147
I'm currently new to Ubuntu programming, and learning the basic's of it. I've been following this tutorial as some of you might know in previous questions asked about it I've made before.
Now, I've created a Web browser using 'quickly'. It's a simple program witch helps create programs on Ubuntu. In the video It showed how to 'refresh' the page witch is basically this code:
def on_refreshbutton_clicked(self, widget):
self.webview.reload()
Now, my question is to make the page go back from a previous page is it this code:
def on_refreshbutton_clicked(self, widget):
self.webview.back()
I used 'refreshbutton' as a example, but if you would like to view the full source of the the code just ask for it and I'll provide you with a link with which you can view the source.
*Code Edit from Mark R. - Thanks for the update.
Upvotes: 0
Views: 5875
Reputation: 11
Create new button and give it label backbutton Than try to add this code to your py file.
def on_backbutton_clicked(self, widget):
self.webview.go_back()
It will go back. Also you can add forward button.
def on_forwardbutton_clicked(self, widget):
self.webview.go_forward()
I hope I am not too late.
Upvotes: 0