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. gui not showing, or closing to fast to see
Forum Updated to NodeBB v4.3 + New Features

gui not showing, or closing to fast to see

Scheduled Pinned Locked Moved Solved General and Desktop
40 Posts 6 Posters 6.1k Views 3 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.
  • JonBJ JonB

    @micha_eleric
    So it looks like you have a problem with those two textEdit pointers? Btw you have done a clean rebuild, so the uic has been run on the latest .ui file? You have initialised the ui prior to this code?

    M Offline
    M Offline
    micha_eleric
    wrote on last edited by micha_eleric
    #27

    @JonB said in gui not showing, or closing to fast to see:

    @micha_eleric
    So it looks like you have a problem with those two textEdit pointers? Btw you have done a clean rebuild, so the uic has been run on the latest .ui file? You have initialised the ui prior to this code?

    actually, i am using a .h file. just saw yesterday, that i could not open it with qt 5 designer, and qt 5 designer saves in .ui

    most other text boxes and buttons run fine.
    code in .h file for text boxes and buttons, look like copy/paste except numbers change.
    dont know how to convert .h to .ui, or how to open .h with qt 5 designer. the qt designer i used before was much easier to design with.

    JonBJ 1 Reply Last reply
    0
    • M micha_eleric

      @JonB said in gui not showing, or closing to fast to see:

      @micha_eleric
      So it looks like you have a problem with those two textEdit pointers? Btw you have done a clean rebuild, so the uic has been run on the latest .ui file? You have initialised the ui prior to this code?

      actually, i am using a .h file. just saw yesterday, that i could not open it with qt 5 designer, and qt 5 designer saves in .ui

      most other text boxes and buttons run fine.
      code in .h file for text boxes and buttons, look like copy/paste except numbers change.
      dont know how to convert .h to .ui, or how to open .h with qt 5 designer. the qt designer i used before was much easier to design with.

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #28

      @micha_eleric
      I happen to notice that after ui->textEdit_38 ui->textEdit_39 is absent, then you say it goes wrong at ui->textEdit_40. Don't know what you want 40+ text edits for, but anyway why not delete all after ui->textEdit_38, make sure it works at that point. Then add the further ones in and see how it goes.

      M 2 Replies Last reply
      0
      • JonBJ JonB

        @micha_eleric
        I happen to notice that after ui->textEdit_38 ui->textEdit_39 is absent, then you say it goes wrong at ui->textEdit_40. Don't know what you want 40+ text edits for, but anyway why not delete all after ui->textEdit_38, make sure it works at that point. Then add the further ones in and see how it goes.

        M Offline
        M Offline
        micha_eleric
        wrote on last edited by
        #29

        @JonB said in gui not showing, or closing to fast to see:

        @micha_eleric
        I happen to notice that after ui->textEdit_38 ui->textEdit_39 is absent, then you say it goes wrong at ui->textEdit_40. Don't know what you want 40+ text edits for, but anyway why not delete all after ui->textEdit_38, make sure it works at that point. Then add the further ones in and see how it goes.

        yah. not sure about that.
        did find 39,40, and 41 cause a crash in another part that call those three, but not the other text boxes.

        1 Reply Last reply
        0
        • JonBJ JonB

          @micha_eleric
          I happen to notice that after ui->textEdit_38 ui->textEdit_39 is absent, then you say it goes wrong at ui->textEdit_40. Don't know what you want 40+ text edits for, but anyway why not delete all after ui->textEdit_38, make sure it works at that point. Then add the further ones in and see how it goes.

          M Offline
          M Offline
          micha_eleric
          wrote on last edited by
          #30

          @JonB said in gui not showing, or closing to fast to see:

          @micha_eleric
          I happen to notice that after ui->textEdit_38 ui->textEdit_39 is absent, then you say it goes wrong at ui->textEdit_40. Don't know what you want 40+ text edits for, but anyway why not delete all after ui->textEdit_38, make sure it works at that point. Then add the further ones in and see how it goes.
          runs fine

                     std::cout << "InitTestBoard try 3 \n" << std::flush;
                   //   ui->textEdit_40->setFixedSize(30,  30);
                   //   ui->textEdit_41->setFixedSize(30,  30);
                      ui->textEdit_42->setFixedSize(30,  30);
                      ui->textEdit_43->setFixedSize(30,  30);
                      ui->textEdit_44->setFixedSize(30,  30);
                      ui->textEdit_45->setFixedSize(30,  30);
                      std::cout << "InitTestBoard try end \n" << std::flush;
          

          crashes

                      std::cout << "InitTestBoard try 3 \n" << std::flush;
                      ui->textEdit_40->setFixedSize(30,  30);
                      ui->textEdit_41->setFixedSize(30,  30);
                      ui->textEdit_42->setFixedSize(30,  30);
                      ui->textEdit_43->setFixedSize(30,  30);
                      ui->textEdit_44->setFixedSize(30,  30);
                      ui->textEdit_45->setFixedSize(30,  30);
                      std::cout << "InitTestBoard try end \n" << std::flush;
          
          1 Reply Last reply
          0
          • M Offline
            M Offline
            micha_eleric
            wrote on last edited by
            #31

            found it
            in CUi_MainWindow.h [the file that has gui layout] file 39, 40, and 41 are different

            1 Reply Last reply
            0
            • JonBJ JonB

              @micha_eleric
              So it looks like you have a problem with those two textEdit pointers? Btw you have done a clean rebuild, so the uic has been run on the latest .ui file? You have initialised the ui prior to this code?

              JonBJ Offline
              JonBJ Offline
              JonB
              wrote on last edited by JonB
              #32

              @JonB said in gui not showing, or closing to fast to see:

              Btw you have done a clean rebuild, so the uic has been run on the latest .ui file?

              @micha_eleric
              Do a complete project rebuild/make some change in Designer to update the .ui file and force uic to run on it again. ui_MainWindow.h is a generated file; don't change it yourself, it will get overwritten.

              M 1 Reply Last reply
              1
              • JonBJ JonB

                @JonB said in gui not showing, or closing to fast to see:

                Btw you have done a clean rebuild, so the uic has been run on the latest .ui file?

                @micha_eleric
                Do a complete project rebuild/make some change in Designer to update the .ui file and force uic to run on it again. ui_MainWindow.h is a generated file; don't change it yourself, it will get overwritten.

                M Offline
                M Offline
                micha_eleric
                wrote on last edited by
                #33

                @JonB not sure where to ui or uic files are. if i still have them

                Pl45m4P 1 Reply Last reply
                0
                • M micha_eleric

                  @JonB not sure where to ui or uic files are. if i still have them

                  Pl45m4P Offline
                  Pl45m4P Offline
                  Pl45m4
                  wrote on last edited by Pl45m4
                  #34

                  @micha_eleric

                  uic is the User Interface Compiler, which does exactly what you've mentioned before.. creates an usable header from your *.ui design template...
                  And every time you re-run it, your header file will be created or updated... so it makes no sense to edit the file yourself and change some object names


                  If debugging is the process of removing software bugs, then programming must be the process of putting them in.

                  ~E. W. Dijkstra

                  M 1 Reply Last reply
                  0
                  • Pl45m4P Pl45m4

                    @micha_eleric

                    uic is the User Interface Compiler, which does exactly what you've mentioned before.. creates an usable header from your *.ui design template...
                    And every time you re-run it, your header file will be created or updated... so it makes no sense to edit the file yourself and change some object names

                    M Offline
                    M Offline
                    micha_eleric
                    wrote on last edited by
                    #35

                    @Pl45m4 just found the .iu file.
                    trying to remember what i did 4 years ago

                    JonBJ 1 Reply Last reply
                    0
                    • M micha_eleric

                      @Pl45m4 just found the .iu file.
                      trying to remember what i did 4 years ago

                      JonBJ Offline
                      JonBJ Offline
                      JonB
                      wrote on last edited by
                      #36

                      @micha_eleric
                      Go into Designer, make some small change, save, build, does it work now?

                      M 3 Replies Last reply
                      0
                      • JonBJ JonB

                        @micha_eleric
                        Go into Designer, make some small change, save, build, does it work now?

                        M Offline
                        M Offline
                        micha_eleric
                        wrote on last edited by
                        #37

                        @JonB build is gray

                        1 Reply Last reply
                        0
                        • JonBJ JonB

                          @micha_eleric
                          Go into Designer, make some small change, save, build, does it work now?

                          M Offline
                          M Offline
                          micha_eleric
                          wrote on last edited by
                          #38

                          @JonB ok. default opens with qt creator, and build is gray
                          open with qt designer, and find no build

                          1 Reply Last reply
                          0
                          • JonBJ JonB

                            @micha_eleric
                            Go into Designer, make some small change, save, build, does it work now?

                            M Offline
                            M Offline
                            micha_eleric
                            wrote on last edited by
                            #39

                            @JonB said in gui not showing, or closing to fast to see:

                            @micha_eleric
                            Go into Designer, make some small change, save, build, does it work now?

                            where is build in qt designer?

                            jsulmJ 1 Reply Last reply
                            0
                            • M micha_eleric

                              @JonB said in gui not showing, or closing to fast to see:

                              @micha_eleric
                              Go into Designer, make some small change, save, build, does it work now?

                              where is build in qt designer?

                              jsulmJ Offline
                              jsulmJ Offline
                              jsulm
                              Lifetime Qt Champion
                              wrote on last edited by
                              #40

                              @micha_eleric said in gui not showing, or closing to fast to see:

                              where is build in qt designer?

                              There is no build in QtDesigner.
                              You build your project in QtCreator. And you also should rather edit ui files in QtCreator (QtDesigner is integrated there)...

                              https://forum.qt.io/topic/113070/qt-code-of-conduct

                              1 Reply Last reply
                              2

                              • Login

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