0
votes

I have a QWidget container that contains my custom widget. This QWidget container was promoted to the custom widget I created. I have a QPushButton on my MainWindow.ui. I want to connect this QPushButton to the promoted QWidget. How will I do this?

For example, I have a function on my promoted QWidget class, and I want to call this function when I click the QPushButton located at the MainWindow.ui.

Thanks in advance!

1
what do you mean by promoted?Mat
@Mat: Technical term in Qt: you promote a standard QWidget (say QEditText) to your customised subclass of the widget (say MyEditText).TonyK

1 Answers

0
votes

Have you considered using a connect??

connect the QPushButton singal clicked to that function (make sure its a slot where its declared).