You need to learn about encapsulation. Even though class 1 could access class 3's QLineEdit, it shouldn't. Class 3's QLineEdit should be local to and accessible by Class 3 only.
Instead, what should happen is that when you press the button, Class 3 will put the text into its QLineEdit, and then notify Class 1 that it has a filename via a signal. Class 1 will then do it's job.
Bookmarks