Building Custom Widgets

I’ve try to build a custom widget, folowing the SodowedBox example in QNX help.
It works fine in my application, but PhAB can’t draw it .
PhAB may not be able to open my library, but I don’t konw why.

I found building a custom widget very complex , is there some tools to make it easier?

A tool which would ask you for the base widget, the attributes you want to add or inherit, the callback you want to define… and then generate the header file, the c file, the palette.pal, edit palette.def, compile the library …

Unless PhAB has changed since the last time I used it with custom widgets, you are correct. It doesn’t display your widget and yes, it is very complicated to create/use.

If you have to use this alot, creating a custom tool to help is always a good idea.


The more recent versions of PhAB let you create templates from existing widgets, which might save you the effort of creating a custom widget. I can’t remember when PhAB started doing this, but I know that 6.2 supports it. Look for “templates” in the index of the Photon Programmer’s Guide.