Help with first app
Damian7546 last edited by Damian7546
I try write my first app in qt.
I created two classes called: window and client. Window contain textbox, butonns etc..., and clinet class contain function to communicato with tcp serwer .
I created "communication" from windows class to client class using signal and slots funcionality :
connect(sentButton, &QPushButton::clicked, &client, &Client::sent_data);
Now I would like to use metod from Window class in Client calass for examle in this metod :
ba1 = 0xAA;
ba1 = 0x55;
ba1 = 0x03;
ba1 = 0x80;
ba1 = 0x01;
ba1 = brightnessscreenBar->value();
But i do not know how get value from ScrollBar from Window clase called "brightnessscreenBar" in Client class ?
JonB last edited by JonB
Don't write it so that in the middle of Client class sending message to server it needs to request a value (like scrollbar) from Window GUI component; better if Client knows nothing about Window. Approach so that Window class can tell client class what it wants it to do, through suitable method parameters or properties etc. supplied from Client.