Hello to everyone !!!
I created a project with qt creator with the name "asd", with
Base class: QDialog
Class name: asdDialog
Header file: asdDialog.h
Source file: asdDialog.cpp
Form file: asdDialog.ui
In the form I added
1. QPushButton with text "HELLO"
2.QLineEdit
I tried to connect them by-code like this way:
I put the connect function in the "asdDialog.cpp", in the constractor "asdDialog::asdDialog(QWidget *parent)" , under "ui->setupUi(this);"
connect(ui->button, SIGNAL(clicked()),
ui->lineEdit, SLOT(writeMessage("HELLO")));
As you see I want to create a new slot for "ui->lineEdit" which does not exist ...
Where can I declare and write the code of "writeMessage("HELLO")"
Is it possible without using the "right click --> Go to slot" ??
If you advice me with "right click --> Go to slot", then when can I use the "connect method" ??
Anyone can help me ?? Thanks in advance !!! (I am from Greece - Volos)
Bookmarks