WtDesigner icon indicating copy to clipboard operation
WtDesigner copied to clipboard

Generated ui_xx.h should include WApplication

Open cls-nebadje opened this issue 8 years ago • 1 comments

Hi Juan,

the generated ui_xx.h references Wt::WApplication in several places but does not include the WApplication header which results in a unclean include hierarchy.

Regards Uli

cls-nebadje avatar Jun 13 '16 15:06 cls-nebadje

The Wt::WApplication header is included in the autogenerated header file with the same name as your project. E.g. for a "Calculator" project you would have a calculator.h with contents like:

#include <Wt/WApplication>

#include "ui_calculator.h"

class Calculator : public Wt::WApplication

This style follows the Qt style which might be good or might be bad but is the one that I know. QtDesigner does exactly the same and I was inspired by WtDesigner. Also other Qt developers are used to this style. Might not be the best option but I don't like re-inventing the wheel, so I think I will keep it this way.

Best.

juangburgos avatar Jun 13 '16 20:06 juangburgos