[Solved] 'webivew' does not name a type
-
i am creating a project and a strange error occured
'webivew' does not name a type
in this source code:
tab.h
@#ifndef TAB_H
#define TAB_H#include <QWidget>
#include "mainwindow.h"
#include "webview.h"
#include <QHBoxLayout>
class MainWindow;
class tab : public QWidget
{
Q_OBJECT
public:
tab(MainWindow *parent = 0);signals:
public slots:
void loadurl(QString url);
private:
webview * view;
QHBoxLayout * layout;
};#endif // TAB_H
@
tab.cpp:
@#include "tab.h"tab::tab(MainWindow *parent) :
QWidget(parent)
{
view = new webview(this);
layout = new QHBoxLayout(this);
layout->addWidget(view);
}
void tab::loadurl(QString url)
{
view->loadurl(url);
}
@
webview is a QWebView sub class
really strange error but i am sure any body nows the solution -
@
#ifndef WEBVIEW_H
#define WEBVIEW_H#include <QWebView>
#include <QWebFrame>
#include <QMenu>
#include "tab.h"
class tab;
class webview : public QWebView
{
Q_OBJECT
private slots:
public:
webview(tab *parent = 0);signals:
void tabcloserequested();
public slots:
void loadurl(QString url);
void customContextMenuRequested(const QPoint &pos);
protected:
QWebView * createWindow(QWebPage::WebWindowType type);
};#endif // WEBVIEW_H
@[Edit: Added @ tags around code; mlong]