[Interest] Best way to reuse forms(or ui design) in a project

Mehmet İpek mhmtipek at gmail.com
Mon Jun 11 10:23:58 CEST 2012


For your first solution, you can use designer for child forms too. Just add
designer form class with widget template and insert widget to the center of
your common form design.

On Mon, Jun 11, 2012 at 10:12 AM, Lijo Antony <lta at one.com> wrote:

> Hi,
>
> I am creating 10 different forms. All of them have a common header and
> footer. Header will have the same background image but different titles
> for different forms. Footer is also similar in concept. I would like to
> make the header and footer design only once and reuse them in all the
> forms. I should be able to set some properties like title from
> individual forms(or the associated implementation class). And if I make
> some design changes(like an extra label) later in header, it should be
> reflected on individual forms.
> Also I would like to do all the ui design using QtCreator.
>
>  From my understanding so far, I can think of following possible solutions.
>
> 1. Inherit from a class implementing the common form design. – I will
> not be able to use QtCreator for designing child forms.
>
> 2. Create a template with header & footer and use the template for
> creating forms. – Any later change in header design will not be
> reflected on the forms
>
> 3. Create custom widgets for header and footer. Integrate with QtCreator
> and use in individual forms. – Relatively complex and some extra overhead.
>
> Since I am new to Qt, I am not sure which is the best way to go ahead or
> there are other options(Qt way!) available. Would any one help me on
> this? Any help would be appreciated.
>
> Thanks,
> -lijo
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20120611/8b3bab30/attachment.html>


More information about the Interest mailing list