Reputation: 864
I am new to Qt and I have been trying to develop a web browser for desktop. I have got the hang of the GUI designing of my web browser, but I have only started to learn this new language.
My question is: how do I execute my own sequence of code when the titleChanged event of the QWebView occurs?
Seriously speaking, I have no idea how to do this, which is why I cannot post any code. But, can someone please post the code for accomplishing my target. You can assume that I have a class called MainWindow, in which I have added the QWebView from the Qt designer.
If I am unclear then please let me know.
Thank You.
Upvotes: 0
Views: 73
Reputation: 40512
QWebView::titleChanged
is a signal, not an event. Go to Qt Designer, open context menu of your QWebView element, choose titleChanged
signal. It will create a slot in your MainWindow class.
Using signals and slots is one of the most basic techniques used in Qt. Please read the documentation carefuly.
Upvotes: 0