create control event function
-
Hi,
as qt (designer) beginner i wonder how to create e.g. a pushButtons OnClick Event and code it (c++)
i am using Visual Studio 2016 and the Qt designer 5.11.0.
a youtube tutorial describes: right click on the control -> "goto slot" ->.... ends with a ...::on_pushButton_clicked() function.
thats what i have expexted.But there is no "goto slot" action in the controls context menu!
How do i do that!
-
Hi,
as qt (designer) beginner i wonder how to create e.g. a pushButtons OnClick Event and code it (c++)
i am using Visual Studio 2016 and the Qt designer 5.11.0.
a youtube tutorial describes: right click on the control -> "goto slot" ->.... ends with a ...::on_pushButton_clicked() function.
thats what i have expexted.But there is no "goto slot" action in the controls context menu!
How do i do that!
-
Hi,
as qt (designer) beginner i wonder how to create e.g. a pushButtons OnClick Event and code it (c++)
i am using Visual Studio 2016 and the Qt designer 5.11.0.
a youtube tutorial describes: right click on the control -> "goto slot" ->.... ends with a ...::on_pushButton_clicked() function.
thats what i have expexted.But there is no "goto slot" action in the controls context menu!
How do i do that!
It's is usually safer to do the connection manually in the constructor, connecting by name backfires too often.
Under
private slots:addvoid onButtonClicked();(you can give it whatever name you like) then in the constructor, aftersetupUi()addconnect(ui->pushButton,&QPushButton::clicked,this,&MyClass::onButtonClicked);(of courseMyClassis the name of the class you are editing
P.S.
@hawiwo said in create control event function:i am using Visual Studio 2016
