Changing a listWidget in another ui.



  • Hi i really need help, after many tries i'm desperate..
    I'm creating an object in my cadastropfisica.cpp, this object contains Name,Adress,etc..
    This cadastropfisica has a .ui, which is basicly some labels and line edits in which i collect those inputs.
    I want to display this person(object) in a list, which is in another ui, but everytime i try to it only allows me to edit cadastropfisica ui...
    How i can edit mainwindow.ui or list.ui while in cadastropfisica.cpp??
    Thanks


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    You don't. The way it's usually done is to use signals and slots where with the signal you send some kind of message to whoever is connected to it that something has changed. The receiver (object which slot is connected to the signal) should then act accordingly.

    It's not the responsibility of cadastropfisica to update other widgets in other classes.

    More information here.

    You should also take a look at Qt's numerous examples.


Log in to reply
 

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