Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Changing a listWidget in another ui.
QtWS25 Last Chance

Changing a listWidget in another ui.

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 506 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    JoseOlivio
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved