Need help with slots and signals
-
Hello. I need some help with signal and slots
i have
file1.cpp
file1.h
file2.cpp
file2.hIn file1 i have tableViev and i load data from database
In file2 i have label
When I double click tableViev. I have variable id_user where I write rows where i clicked
now i want connect file1 tableViev -> file2 label
when i clicked file1 tableViev i want change file2 label to id_user
Someone can say me how i shoud do this? -
Hi,
Do you mean when you select a line ?
-
Do you mean when you select a line ?
yes
-
Then have a look at the activated signal. You can create a custom slot in your class that extract id_user and emit another signal with a QString parameter that you'll connect your QLabel setText slot