Calling the MainWindow UI from another class



  • Hello,

    I connected a signal in client.cpp file to a slot in mainwindow.cpp file.

    The connection works , the QMessagebox in the slot is working.

    But the ui->blablabla won't work.

    I tried to delete the ~MainWindow() function who was trying to delete the pointer of *ui.

    But no positive results, have you any suggestion ??



  • It's hard to understand without more information or code. To me looks like you're trying to access a private member of a class MainWindow, since normally the "ui" is marked as private.
    The programs is running or gives a compilation error?



  • i switched the ui and rest of pointers from ptivate to public

    But it still can't call the UI.



  • Can you post some code?


Log in to reply
 

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