![]() ![]() I understand what you're saying but at the same time confused. Of course the other thing you could do is make the order function a method of the hardwareTab. Also notice that the text I entered in the snTextBox (This is the text I entered) is printed out by the newHardware() function. These are the QLineEdit objects you are looking for. Text This is the text I enteredNotice that the object ID's printed in the hardwareTab._init_() match the ID's of the objects passed to the newHardware() function. To make this work you need to pass the original hardware tab object, the one that has the text boxes that hold the text you entered. ![]() Also notice that nothing was printed for snTextBox.text(). It makes a different snTextBox widget (id 0x28f730f3440). This calls the hardwareTab._init_() and creates a snTextBox widget. When I push the enButton it creates a new newHardware object. Notice the object ID for the textbox (0x28f730188c0). ![]() TextThe first three lines in the output are the hardwareTab object being created. Self.enButton = QPushButton("ENTER NEW HARDWARE") QMainWindow, QWidget, QVBoxLayout, QTabWidget The textboxes in the enterNewHardware object are not the same textboxes that are in the hardwareTab.įrom PySide2.QtWidgets import QPushButton, QLineEdit, QApplication, \ There is no relationship between the hardware tab object and the enterNewHardware object.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |