PDA

View Full Version : Global includes with designer custom widgets



mab
12th September 2006, 16:46
Hi,

Is it possible for designer custom widget to tell to designer (Qt 4), that include returned by QDesignerCustomWidgetInterface::includeFile() is global (ie. it should be generated like #include <something.h> and not #include "something.h" in .h file)?
I know it is possible to achieve desired behavior by adding attribute location to header element in .ui file (something like
<header location="global">rdswidget/smaptree.h</header>), but I need my custom widget to make designer to do it automaticaly. Adding this element to domXml() method of widget interface doesn't seem to work. :(

Thanks a lot

Martin

wysota
28th September 2006, 06:22
Does that really make a difference if the include is "global" or "local"?

mab
5th October 2006, 22:06
It is bacause of libraries containing widgets pluged into designer, I want to make includes global. When somebody uses such library, adds -I/path/to/my/library to makefile, draws his widgets in designer using plugins from libray and generates .h from .ui files, he gets .h files where are includes like #include "library_widget.h". Happily gcc will find library_widget.h in /path/to/my/library even with these "", but it seems to me, that #include <library_widget.h> would be much cleaner.