@Cantona said in Help sending data from dialog to main window:
variable username still is not getting any data assigned to it
Unpleasant answer but no secret or surprise:
You need to know C++ if you want to get somewhere with Qt :)
Learn the basics of C++ and OOP and you will understand better and learn faster how to work with Qt.
@JonB said in Help sending data from dialog to main window:
// mainwindow cpp file
QString username;
UsernameDialog *usernameDialog = new UsernameDialog;
if (usernameDialog->exec())
username = usernameDialog->username();
This answer by @JonB is basically everything you need to do to return your variable from your dialog and assign it to something within your QMainWindow class.