How to create copy of Ui and class or import existing one.
I have a project that include many different dialog forms, but all of them has 40% similar code.
So how i can copy existing forms in same project of course with different names, or i can create dialog in another project then include copies into my project with different names.
BilbonSacquet last edited by
Could give us more explanation regarding this 40% of similar code?
Well its mostly bodies of slots and some parts of algorithms that has similar structure for different forms.
Do you try to use derived ui files? Is that what is your idea?
AFAIK there were templates in designer, perhaps those also work in creator...
But I don't remember, how you could create those templates...
And you could create an implementation for that template and derive your dialogs from that base instead of QDialog.
Where i can find information about creating ui templates?
[quote author="Gerolf" date="1321865941"]And you could create an implementation for that template and derive your dialogs from that base instead of QDialog.[/quote]
Quite true, however, also considder if encapsulation is an alternative for you. You might be able to encapsulate the shared 40% in a class of its own, and just give each of your dialogs an instance of that class.
But can i derive user form?
there are few buttons and table view, of course i can add those by hand but however is it possible?
If you use google search, you would find, e.g.
"Adding New Custom Wizards":http://doc.qt.nokia.com/qtcreator-2.3/creator-project-wizards.html
"Extending Qt Creator Manual":http://doc.qt.nokia.com/qtcreator-extending/index.html
"File templates in Qt Creator":http://www.qtcentre.org/threads/28909-File-templates-in-Qt-Creator
just to mention the first three hits :-)