Hello, there. it's me again 
I have a class HTMLWindow
{
Q_OBJECT
......
}
class HTMLWindow : public QWidget
{
Q_OBJECT
......
}
To copy to clipboard, switch view to plain text mode
and I have a class as QApplication that manage thoses windows
class HTMLWindow;
{
Q_OBJECT
public:
WindowManager(int &argc, char **argv);
~WindowManager();
void addWindow(void);
QList<QPointer<HTMLWindow> > WindowList;
private:
};
class HTMLWindow;
class WidgetManager : public QApplication
{
Q_OBJECT
public:
WindowManager(int &argc, char **argv);
~WindowManager();
void addWindow(void);
QList<QPointer<HTMLWindow> > WindowList;
private:
QSystemTrayIcon *trayIcon;
QMenu *trayIconMenu;
QAction *quitAction;
};
To copy to clipboard, switch view to plain text mode
then my problem is in WindowManager::addWindow()
void WidgetManager::addWindow(void){
HTMLWindow *newwindow = new HTMLWindow();
newwindow.
setGeometry(QRect(100,
100,
285,
110));
// error1WindowList->append(newwindow); //error 2
}
void WidgetManager::addWindow(void){
HTMLWindow *newwindow = new HTMLWindow();
newwindow.setGeometry(QRect(100,100,285,110)); // error1
WindowList->append(newwindow); //error 2
}
To copy to clipboard, switch view to plain text mode
Error 1 is : request for member `load' in `newwindow', which is of non-class type `HTMLWindow*'
Error 2 is : base operand of `->' has non-pointer type `QList<QPointer<HTMLWindow> >'
I followed the example browser in Qt\demos\browser
when i call addWindow the newWindow is created but seems i cannot access its method
I dont find where is the problem, are the two error linked ?
thx for your help
Bookmarks