Created
August 2, 2021 07:42
-
-
Save ameerkahiri/cf2a5d0ea8fa0aa436acb52c484d596d to your computer and use it in GitHub Desktop.
ToDoApps : SlotAddNewTask
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void ToDoApps::SlotAddNewTask() { | |
// Get the line edit text | |
QString taskName = ui.NewTaskLineEdit->text(); | |
// Get current date | |
QString date = QDate::currentDate().toString(); | |
createNewTask(taskName, date); | |
// This is how to trigger signal | |
//emit SignalAddNewTask(taskName, date); | |
// Then in other class/widget connect it like | |
//ToDoApps* obj; | |
//connect(obj, SIGNAL(SignalAddNewTask(QString, QString)), this, SLOT(SlotToSomethingInThatClass())); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment