Tk007LwZFJW5ej
October 18th, 2011, 02:23 PM
I have a class called appWindow that subclasses QMainWindow. It contains a QProgressBar* called webLoad and an instance of another class:
firstpage = new articlePage;articlePage contains a QWebView called wordSearch.
I want the progress bar to show the progress of wordSearch while loading, so, in appwindow.cpp, I have:
connect(firstPage->wordSearch, SIGNAL(loadProgress(int)), webLoad, SLOT(setValue(int)));.
When I try to access a signal of a member variable of another class, I get a seg fault. There's only one case in which I've made this work: accessing the clicked() signal of QPushButton *quit of appWindow from main.cpp to quit the application.
I always instantiate the class before trying to connect signals. I can access signals of in-class member variables just fine. I've been banging my head over this for days. What could I be doing wrong?
firstpage = new articlePage;articlePage contains a QWebView called wordSearch.
I want the progress bar to show the progress of wordSearch while loading, so, in appwindow.cpp, I have:
connect(firstPage->wordSearch, SIGNAL(loadProgress(int)), webLoad, SLOT(setValue(int)));.
When I try to access a signal of a member variable of another class, I get a seg fault. There's only one case in which I've made this work: accessing the clicked() signal of QPushButton *quit of appWindow from main.cpp to quit the application.
I always instantiate the class before trying to connect signals. I can access signals of in-class member variables just fine. I've been banging my head over this for days. What could I be doing wrong?