PDA

View Full Version : .h file not found for my custom widget plugin ?



tonnot
1st December 2010, 18:55
I can see (and drop into my form) my custom widgets (plugin based). (So I have a dll at \Qt\qt\plugins\designer)
But I discover that there is an error because there is not found 'my_widget.h' when I wnat to run the program.
I remember something related with the .pro file.
Any help ? Thanks

ChrisW67
1st December 2010, 22:42
The pro file INCLUDEPATH should include the directory containing the header files for your widget.

tonnot
2nd December 2010, 10:55
I can't do it ....
Even I put the .h file at D:/Qt/qt/plugins/designer/
and I write at .pro file :
INCLUDEPATH += D:/Qt/qt/plugins/designer/
nothing .....
error : No such file or directory

What more have I to include at .pro file ?
I'm searching into QT Help something about 'How to use your own customwidgets plugins' but ....
Help, please . Any good link ?

ChrisW67
2nd December 2010, 22:44
But I discover that there is an error because there is not found 'my_widget.h' when I wnat to run the program.

Not finding a header file when compiling the program is governed solely by the path the compiler uses to search for include files. With GCC this uses -I options, and these are generated by setting INCLUDEPATH correctly in you PRO file.

If the problem is at run time then the header files are not involved. Your are probably being told that the dynamic library for your custom widget cannot be found. Your plugin should be in the relevant plugins directory for the running application (this is not Designer).

BTW: It is "Qt" not "QT"