Dear all,
How do i reuse an existing class? i've already included the header file & given include path in makefile. Still i'm getting linking error of "undefined reference to". How to solve this problem?
Regards,
abhishek
Dear all,
How do i reuse an existing class? i've already included the header file & given include path in makefile. Still i'm getting linking error of "undefined reference to". How to solve this problem?
Regards,
abhishek
#include "browser/browserapplication.h"
int main(int argc, char *argv[])
{
BrowserApplication *bapp = new BrowserApplication(argc, argv);
bapp->newMainWindow();
bapp->exec();
}
i'm getting following errors:
main.o: In function `main':
main.cpp.text+0x2b6): undefined reference to `BrowserApplication::BrowserApplication(int&, char**)'
main.cpp.text+0x3fa): undefined reference to `BrowserApplication::newMainWindow()'
collect2: ld returned 1 exit status
make: Leaving directory `/opt/qtsdk-2010.02/qt/demos/ebook'
make: *** [ebook] Error 1
Exited with code 2.
Error while building project ebook
When executing build step 'Make'
What is browserapplication.h? Did you write it yourself?
If it is the one from Qt's example code it has a main.cpp and a project file (browser.pro) Use open project (from Qt Creator) to open and build that project file.
That headerfile is from Qt's example code. That project is building independently. ii want to reuse the BrowserApplication class in my application. i want to call its methods from my app.
For that you will need to add to your project at least browserapplication.h and browserapplication.cpp
But that class will use other classes form their project (you will need that classes too)
I recommend to study the code and write your own reusable code. (that particular class won't be so "reusable" because it creates the qapplication and mainwindow in it's code)
Is there anyway to launch this browser by connecting it to a button? Or how to link QDesktopServices to a button?
i want to load a specific file in a browser by clicking a button in my app.
Bookmarks