How to bind a QString variable and lineEdit?
I have many QString variables which I'm displaying in the UI lineEdits by ui->lineEdit->setText(var1) function.When the user changes the value in the lineEdit corresponding QString variable should also update.I DONT want lineEdits to send signals,instead I want bind each variable with its corresponding lineEdit i.e when either of them change other should change.Is it possible?
No, its not possible.
Signal and slots are how it works.
You cannot bind a variable to lineEdit as such.
Why dont you want to use signals ? its how widgets are designed to work. :)
I have some 100s of lineEdits in Multiple Stackedwidget pages.I dont want to apply signals and slots to all of them.
But without TextChanged signal or similar, how can you know text have been changed ?
You have to use signals/slots. Write some code to encapsulate the signal/slot linkage between lineEdit & variable generically, then set them up dynamically if you don't want to type in all the links manually.