Solved Qt QRadioButton (1) setChecked problem
-
@mrjj said in Qt QRadioButton (1) setChecked problem:
Hi
Ok so it's via the text change signal back to form 1Could you try to place a button on form 1 and in its clicked
try
ui->licenceagrement->hide();just to see it can work. All look good so im a bit baffled.
void registeracc::on_justtestbutton_clicked() { ui->licenceagrement->hide(); }
from the first form it works and it hides the QRadiobutton as the picture
-
Hi
Ok so names etc are fine.Then last test
void registeracc::recieveacc(QString recieve){ ch = recieve; if(recieve=="yes"){ ui->licenceagrement->show(); qDebug()<<"i just called show"; } if(recieve=="no"){ ui->licenceagrement->hide(); qDebug()<<"i just called hide"; } }
and tell me if the new texts show as it should ?
-
@mrjj said in Qt QRadioButton (1) setChecked problem:
Hi
Ok so names etc are fine.Then last test
void registeracc::recieveacc(QString recieve){ ch = recieve; if(recieve=="yes"){ ui->licenceagrement->show(); qDebug()<<"i just called show"; } if(recieve=="no"){ ui->licenceagrement->hide(); qDebug()<<"i just called hide"; } }
and tell me if the new texts show as it should ?
-
Hi,
In the upper part of that picture you have a lic variable that is a licenseagrement object. I suspect that this is the one you are seeing. You are likely not hiding what you think you are hiding.
-
@SGaist said in Qt QRadioButton (1) setChecked problem:
Hi,
In the upper part of that picture you have a lic variable that is a licenseagrement object. I suspect that this is the one you are seeing. You are likely not hiding what you think you are hiding.
i think you are correct bro ! i used this object when i click the QRadiobutton in the first form it shows the second dialog!?
-
@Proton-Phoenix said in Qt QRadioButton (1) setChecked problem:
@SGaist said in Qt QRadioButton (1) setChecked problem:
Hi,
In the upper part of that picture you have a lic variable that is a licenseagrement object. I suspect that this is the one you are seeing. You are likely not hiding what you think you are hiding.
i think you are correct bro ! i used this object when i click the QRadiobutton in the first form it shows the second dialog!?
i have change it now to this but the same problem
-
Hi
So testWindow is the "Dialog " (in title) we see ?if yes, dont it miss a connect there so its textChanged signal can come back to registeracc ?
Its a new object so its not connected.
-
@mrjj said in Qt QRadioButton (1) setChecked problem:
Hi
So testWindow is the "Dialog " (in title) we see ?if yes, dont it miss a connect there so its textChanged signal can come back to registeracc ?
Its a new object so its not connected.
Yes bro
every time i click the first QRadioButton it shows The Dialog window
then in Dialog cpp i connected it using this (i am just a beginner)connect(ui->statuslineedit,SIGNAL(textChanged(QString)),reg,SLOT(recieveacc(QString)));
so the problem is the new object which is not connected??
but how it send the QString! every time i click The QRadioButton in the dialog which was opened from the new object?
is there any solution?
sorry for making you all that tired but anyway it's experience for you may someday you will help another beginner on it
Really Thank you all what you are doing guys <3registeracc *reg=new registeracc(); // i think the problem here it's also a new object! connect(ui->statuslineedit,SIGNAL(textChanged(QString)),reg,SLOT(recieveacc(QString)));
-
@Proton-Phoenix
Hi
yes that is the issue.
Its not the one we are looking at :) -
@mrjj said in Qt QRadioButton (1) setChecked problem:
@Proton-Phoenix
Hi
yes that is the issue.
Its not the one we are looking at :):D Strange :D ^^ Really Thank you bro all of you guys You are making Great job here <3 i wish all the best happy great life for all of you <3
may someday someone will have the same problem and it will be in the hippocampus sql ^^ :D
so it's changing but it doesn't show changes because it's a new object not the original form
^^ is there any solution !? advice !
registeracc *reg=new registeracc();
it accept only new object pointers to connectconnect(ui->statuslineedit,SIGNAL(textChanged(QString)),reg,SLOT(recieveacc(QString)));
-
problem fixed ... Really Thank you guys <3
mrjj and SGaist ...
this is the warning which were deceiving me from the very beginning
i thought it was a problem
but it's the solution