You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To get a widget from a QLayout, you have to call its itemAt(index) method. As the name of this method implies, it will return an item instead of a widget. Calling widget() on the result will finally give you the widget:
To get a widget from a QLayout, you have to call its itemAt(index) method. As the name of this method implies, it will return an item instead of a widget. Calling widget() on the result will finally give you the widget:
myWidget = self.myLayout.itemAt(index).widget()
how about events? for example, I added customized PyPushButton to the page, and in "setup_main_window" I added
`self.my_btn = PyPushButton(text="button", radius=8)
self.my_btn.setMaximumHeight(25)
///both self.btn_clicked and self.btn_released are defined in "main.py"
self.my_btn.clicked.connect(self.btn_clicked)
self.my_btn.released.connect(self.btn_released)
`
so in "main.py" how can I receive the event that triggered by clicking the customized push button? currently, it is checked by object name / btn_id.
Im trying to access a costum PyLineEdit widget which was added to the row_1_layout in the setup_main_window.py with the following row in main.py:
which kind of type do i have to look for? Im always getting None.
.isEmpty() is returning false though.
Already tried PyLineEdit aswell as QLineEdit which it inherits from(?)
->class PyLineEdit(QLineEdit):
The text was updated successfully, but these errors were encountered: