Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt QRadioButton (1) setChecked problem
Forum Updated to NodeBB v4.3 + New Features

Qt QRadioButton (1) setChecked problem

Scheduled Pinned Locked Moved Solved General and Desktop
19 Posts 3 Posters 1.4k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • mrjjM Offline
    mrjjM Offline
    mrjj
    Lifetime Qt Champion
    wrote on last edited by
    #8

    Hi
    Ok so it's via the text change signal back to form 1

    Could 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.

    P 1 Reply Last reply
    1
    • mrjjM mrjj

      Hi
      Ok so it's via the text change signal back to form 1

      Could 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.

      P Offline
      P Offline
      Proton Phoenix
      wrote on last edited by
      #9

      @mrjj said in Qt QRadioButton (1) setChecked problem:

      Hi
      Ok so it's via the text change signal back to form 1

      Could 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();
      }
      

      alt text

      from the first form it works and it hides the QRadiobutton as the picture

      1 Reply Last reply
      0
      • mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on last edited by
        #10

        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 ?

        P 1 Reply Last reply
        0
        • mrjjM mrjj

          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 ?

          P Offline
          P Offline
          Proton Phoenix
          wrote on last edited by
          #11

          @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 ?

          alt text

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #12

            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.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            P 1 Reply Last reply
            3
            • SGaistS SGaist

              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.

              P Offline
              P Offline
              Proton Phoenix
              wrote on last edited by
              #13

              @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!?

              P 1 Reply Last reply
              0
              • P Proton Phoenix

                @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!?

                P Offline
                P Offline
                Proton Phoenix
                wrote on last edited by
                #14

                @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
                alt text

                1 Reply Last reply
                0
                • mrjjM Offline
                  mrjjM Offline
                  mrjj
                  Lifetime Qt Champion
                  wrote on last edited by
                  #15

                  @Proton-Phoenix

                  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.

                  1 Reply Last reply
                  1
                  • P Offline
                    P Offline
                    Proton Phoenix
                    wrote on last edited by Proton Phoenix
                    #16

                    @mrjj said in Qt QRadioButton (1) setChecked problem:

                    @Proton-Phoenix

                    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 <3

                    registeracc *reg=new registeracc(); // i think the problem here it's also a new object!
                      connect(ui->statuslineedit,SIGNAL(textChanged(QString)),reg,SLOT(recieveacc(QString)));
                    
                    mrjjM 1 Reply Last reply
                    0
                    • P Proton Phoenix

                      @mrjj said in Qt QRadioButton (1) setChecked problem:

                      @Proton-Phoenix

                      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 <3

                      registeracc *reg=new registeracc(); // i think the problem here it's also a new object!
                        connect(ui->statuslineedit,SIGNAL(textChanged(QString)),reg,SLOT(recieveacc(QString)));
                      
                      mrjjM Offline
                      mrjjM Offline
                      mrjj
                      Lifetime Qt Champion
                      wrote on last edited by
                      #17

                      @Proton-Phoenix
                      Hi
                      yes that is the issue.
                      Its not the one we are looking at :)

                      P 1 Reply Last reply
                      1
                      • mrjjM mrjj

                        @Proton-Phoenix
                        Hi
                        yes that is the issue.
                        Its not the one we are looking at :)

                        P Offline
                        P Offline
                        Proton Phoenix
                        wrote on last edited by Proton Phoenix
                        #18

                        @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 connect

                        connect(ui->statuslineedit,SIGNAL(textChanged(QString)),reg,SLOT(recieveacc(QString)));

                        1 Reply Last reply
                        0
                        • P Offline
                          P Offline
                          Proton Phoenix
                          wrote on last edited by
                          #19

                          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

                          alt text

                          1 Reply Last reply
                          1

                          • Login

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • Users
                          • Groups
                          • Search
                          • Get Qt Extensions
                          • Unsolved