Modifying cascaded UI at runtime



  • Hello,

    I had "this":http://developer.qt.nokia.com/forums/viewthread/9973/ problem and solved it with "this":http://developer.qt.nokia.com/forums/viewthread/6536 help.

    I actually have the following structure:

    • MainWidget with (a custom) constructor and a "setupUi()" inside it.
    • ComponentWidget with (a default and a custom) constructor and a "setupUi()" inside.
    • the *.ui of the ComponentWidget is embedded (through promotion) in the *.ui of the MainWidget (Qt-Designer).

    I create the ComponentWidget through initialization list from MainWidget, but the "setupUi" calls the default constructor (that I "must" provide) so I get the default UI of the component at the end.

    I actually want to create many components in the style of "component.ui" and customize each afterwards (let say change the text on the buttons if you read the linked post). For that I need to pass arguments to the constructor of the embedded component. I looked at the generated class, but didn't figure out how to proceed.

    Any help would be appreciated.



  • I just found some documentation at "this":http://doc.qt.nokia.com/latest/qtuitools.html and "this":http://doc.qt.nokia.com/latest/quiloader.html locations and will try to go through it, but if someone knows the solution or a better approach to achieve what I am trying to do... let me know.



  • Hmmm, that did not help, because the ui I want to modify at runtime is the embedded one (generated code).


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.