I have a subclass of QMainWindow that includes a QProgressBar as a member. The subclass also contains an instance of another class called articlePage, which contains a QWebView. I want to connect the loadProgress signal of the QWebView to the setValue slot of the progress bar.
class articlePage;
{
Q_OBJECT
public:
private:
articlePage *firstPage;
class articlePage;
class appWindow : public QMainWindow
{
Q_OBJECT
public:
appWindow(QWidget* parent = 0);
private:
articlePage *firstPage;
QProgressBar *webLoad;
To copy to clipboard, switch view to plain text mode
{
Q_OBJECT
public:
QWebView *wordSearch;
class articlePage : public QWidget
{
Q_OBJECT
public:
articlePage(QWidget* parent=0);
QWebView *wordSearch;
To copy to clipboard, switch view to plain text mode
Placing
connect(firstPage->wordSearch, SIGNAL(loadProgress(int)), webLoad, SLOT(setValue(int)));
connect(firstPage->wordSearch, SIGNAL(loadProgress(int)), webLoad, SLOT(setValue(int)));
To copy to clipboard, switch view to plain text mode
in appWindow.cpp gives a segmentation fault. What is the proper way to access wordSearch's signals?
Bookmarks