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. How to remove manually created form and replace with QTDesigner creatted one.
Forum Updated to NodeBB v4.3 + New Features

How to remove manually created form and replace with QTDesigner creatted one.

Scheduled Pinned Locked Moved Unsolved General and Desktop
26 Posts 3 Posters 2.9k Views 1 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.
  • A Anonymous_Banned275

    @JonB said in How to remove manually created form and replace with QTDesigner creatted one.:

    @AnneRanch said in How to remove manually created form and replace with QTDesigner creatted one.:

    That gets me to QTDesigner and I can edit the form. At that point I have no knowledge how my editing gets implemented - sort of "under the hood" .

    Designer reads the .ui file, and saves back to it if you make changes and save.

    I exit the QTDesigner and go back to QTCreator

    You should not be "exiting" the Designer or "go back to" Creator. You should be in Creator the whole time, never leaving it. Designer is available as a window inside Creator, which gets opened for you when you double click on a form. It's a window like many other windows in Creator, e.g. the C++ text editor is also a window there. You should be swapping between the Designer window and the Editor window all from within Creator.

    only to find out that simple change of text of button text did not take.

    Then something is wrong. When you say "change of text of button text did not take." you might mean you see that in one of two places. Can you be very specific:

    1. You are looking at the button in Designer. You have not compiled or run your application after making a change. Is this where you do not see your edit?

    2. You have compiled and run your application. In your running application you do not see your edit. Is this what you mean?

    Obviously if #1 is true then #2 is (likely to be) true. But #2 might be true without #1 being true. So I'm sure you fall foul in #2, but is #1 bad fro you too? You made a change in Designer, saved; at a later date you are looking at in Designer and you do not visually see the change? Or do you always see your change visually in Designer but it does not "take" into the running application code?

    Returning to earlier:

    I exit the QTDesigner and go back to QTCreator

    We really need to know exactly what you mean by this. If you are really running just Qt Designer as a separate thing you do, outside of Creator, that's wrong, and might cause problems if they do not have the exact same path to the .ui file.

    Please give me some credit - just because I do not spell / say I complied it does not mean I did not. Most of the time QT works as expected and compiles automatically after change is made.

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

    @AnneRanch said in How to remove manually created form and replace with QTDesigner creatted one.:

    Please give me some credit - just because I do not spell / say I complied it does not mean I did not.

    I have no idea what you mean. All I have done is try to explain things. I have not "failed to give you credit" for anything at any stage. If you're not happy with the explanation we can leave it, but I'm not going to be told I have not given you credit or been anything other than helpful and polite.

    You haven't answered the question I gave you about #1 versus #2, so I am non the wiser as to where your phrasing of "why my change in the actual l form did not take?" refers to. Nor what your "I exit the QTDesigner and go back to QTCreator" means --- I can't tell whether you are in Creator the whole time and use Designer in one of its windows, or whether you go outside Creator and run up a separate Designer instance.

    1 Reply Last reply
    1
    • A Offline
      A Offline
      Anonymous_Banned275
      wrote on last edited by Anonymous_Banned275
      #14

      Here is the screenshot of QTDesigner
      9649aa1a-a9cd-44af-8d8b-5df872f357b9-image.png

      Here is the app run

      fce6c9c9-a0b3-426b-8402-52129cfebcaf-image.png

      Please note the button text in lower right corner .

      How do I find WHICH whatever file (device ??? ) is run ?

      1 Reply Last reply
      0
      • JonBJ JonB

        @AnneRanch
        When you create a form in Designer (that's the word it uses for a "visual widget you design") you might call it form or device or banana. Let's say it's banana. Then:

        • The Designer file for the form (visual widgets) will be banana.ui.
        • When uic banana.ui gets run it will produce a file named ui_banana.h.
        • You will also have files banana.cpp and banana.h, which you can edit for your own code.
        • banana.cpp will have a #include "ui_banana.h" line and a #include "banana.h" line.

        So if (?) "device.ui" is read - why my change in the actual l form did not take?

        Maybe when you answer questions in my previous post about what you might mean by "I exit the QTDesigner and go back to QTCreator only to find out ..." we may know.

        A Offline
        A Offline
        Anonymous_Banned275
        wrote on last edited by
        #15

        @JonB said in How to remove manually created form and replace with QTDesigner creatted one.:

        @AnneRanch
        When you create a form in Designer (that's the word it uses for a "visual widget you design") you might call it form or device or banana. Let's say it's banana. Then:

        • The Designer file for the form (visual widgets) will be banana.ui.
        • When uic banana.ui gets run it will produce a file named ui_banana.h.
        1. How do I verify
          a. If `uic " runs at all ?
          is there verbatim output available ?
          (can i read the date of creation of NEW ui_deviice.h - where ?)
          b. It appears that there are at lest TWO "device.ui" - therefore which one is being run - by "uic" ?
        • You will also have files banana.cpp and banana.h, which you can edit for your own code.

        That would defeat the GUI of QTDesigner....

        • banana.cpp will have a #include "ui_banana.h" line and a #include "banana.h" line.

        That looks as an answer to above "date of creation " question.

        So if (?) "device.ui" is read - why my change in the actual l form did not take?

        Maybe when you answer questions in my previous post about what you might mean by "I exit the QTDesigner and go back to QTCreator only to find out ..." we may know.

        PLEASE ..... get real....

        Christian EhrlicherC JonBJ 2 Replies Last reply
        0
        • A Anonymous_Banned275

          @JonB said in How to remove manually created form and replace with QTDesigner creatted one.:

          @AnneRanch
          When you create a form in Designer (that's the word it uses for a "visual widget you design") you might call it form or device or banana. Let's say it's banana. Then:

          • The Designer file for the form (visual widgets) will be banana.ui.
          • When uic banana.ui gets run it will produce a file named ui_banana.h.
          1. How do I verify
            a. If `uic " runs at all ?
            is there verbatim output available ?
            (can i read the date of creation of NEW ui_deviice.h - where ?)
            b. It appears that there are at lest TWO "device.ui" - therefore which one is being run - by "uic" ?
          • You will also have files banana.cpp and banana.h, which you can edit for your own code.

          That would defeat the GUI of QTDesigner....

          • banana.cpp will have a #include "ui_banana.h" line and a #include "banana.h" line.

          That looks as an answer to above "date of creation " question.

          So if (?) "device.ui" is read - why my change in the actual l form did not take?

          Maybe when you answer questions in my previous post about what you might mean by "I exit the QTDesigner and go back to QTCreator only to find out ..." we may know.

          PLEASE ..... get real....

          Christian EhrlicherC Offline
          Christian EhrlicherC Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #16

          @AnneRanch said in How to remove manually created form and replace with QTDesigner creatted one.:

          (can i read the date of creation of NEW ui_deviice.h - where ?)

          man ls is your friend. Or a simple file manager which is able to show the creation date (so I would say all of them).

          b. It appears that there are at lest TWO "device.ui" - therefore which one is being run - by "uic" ?

          There is only one in a build directory, otherwise you should clear you build dir and start over. Also the generated file must not be in your source dir - maybe you copied it by accident in there.

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          A 1 Reply Last reply
          1
          • A Anonymous_Banned275

            @JonB said in How to remove manually created form and replace with QTDesigner creatted one.:

            @AnneRanch
            When you create a form in Designer (that's the word it uses for a "visual widget you design") you might call it form or device or banana. Let's say it's banana. Then:

            • The Designer file for the form (visual widgets) will be banana.ui.
            • When uic banana.ui gets run it will produce a file named ui_banana.h.
            1. How do I verify
              a. If `uic " runs at all ?
              is there verbatim output available ?
              (can i read the date of creation of NEW ui_deviice.h - where ?)
              b. It appears that there are at lest TWO "device.ui" - therefore which one is being run - by "uic" ?
            • You will also have files banana.cpp and banana.h, which you can edit for your own code.

            That would defeat the GUI of QTDesigner....

            • banana.cpp will have a #include "ui_banana.h" line and a #include "banana.h" line.

            That looks as an answer to above "date of creation " question.

            So if (?) "device.ui" is read - why my change in the actual l form did not take?

            Maybe when you answer questions in my previous post about what you might mean by "I exit the QTDesigner and go back to QTCreator only to find out ..." we may know.

            PLEASE ..... get real....

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

            @AnneRanch said in How to remove manually created form and replace with QTDesigner creatted one.:

            That would defeat the GUI of QTDesigner....

            Told you what there is. You're wrong if you think/believe otherwise.

            b. It appears that there are at lest TWO "device.ui" - therefore which one is being run - by "uic" ?

            Hence your issue, as suspected.

            PLEASE ..... get real....

            Pardon? You're not wishing to be insulting again are you?

            1 Reply Last reply
            2
            • Christian EhrlicherC Christian Ehrlicher

              @AnneRanch said in How to remove manually created form and replace with QTDesigner creatted one.:

              (can i read the date of creation of NEW ui_deviice.h - where ?)

              man ls is your friend. Or a simple file manager which is able to show the creation date (so I would say all of them).

              b. It appears that there are at lest TWO "device.ui" - therefore which one is being run - by "uic" ?

              There is only one in a build directory, otherwise you should clear you build dir and start over. Also the generated file must not be in your source dir - maybe you copied it by accident in there.

              A Offline
              A Offline
              Anonymous_Banned275
              wrote on last edited by
              #18

              @Christian-Ehrlicher said in How to remove manually created form and replace with QTDesigner creatted one.:

              @AnneRanch said in How to remove manually created form and replace with QTDesigner creatted one.:

              (can i read the date of creation of NEW ui_deviice.h - where ?)

              man ls is your friend. Or a simple file manager which is able to show the creation date (so I would say all of them).

              QTCreator does same

              b. It appears that there are at lest TWO "device.ui" - therefore which one is being run - by "uic" ?

              There is only one in a build directory, otherwise you should clear you build dir and start over. Also the generated file must not be in your source dir - maybe you copied it by accident in there.
              '
              it is source directory and I did not put it there .

              It is same as when I use QTCreator to build dialog project and it works / updates just fine.

              All good points...'

              Now let's answer this - used as a troubleshooting aid
              I added "go to slot " by pressing the button on the form in question
              it works as expected

              my conclusion
              the form was saved / updated/ complied /uic and processed correctly

              so WHY same is not happening when text of the button is changed ?

              what is the difference ?

              1 Reply Last reply
              0
              • JonBJ JonB

                @AnneRanch
                When you create a form in Designer (that's the word it uses for a "visual widget you design") you might call it form or device or banana. Let's say it's banana. Then:

                • The Designer file for the form (visual widgets) will be banana.ui.
                • When uic banana.ui gets run it will produce a file named ui_banana.h.
                • You will also have files banana.cpp and banana.h, which you can edit for your own code.
                • banana.cpp will have a #include "ui_banana.h" line and a #include "banana.h" line.

                So if (?) "device.ui" is read - why my change in the actual l form did not take?

                Maybe when you answer questions in my previous post about what you might mean by "I exit the QTDesigner and go back to QTCreator only to find out ..." we may know.

                A Offline
                A Offline
                Anonymous_Banned275
                wrote on last edited by Anonymous_Banned275
                #19

                @JonB said in How to remove manually created form and replace with QTDesigner creatted one.:

                @AnneRanch
                When you create a form in Designer (that's the word it uses for a "visual widget you design") you might call it form or device or banana. Let's say it's banana. Then:

                • The Designer file for the form (visual widgets) will be banana.ui.
                • When uic banana.ui gets run it will produce a file named ui_banana.h.

                I have deleted existing references ( include ) to my ui_device .h .
                Run "clear" AND "rebuild" .

                It failed with multiple errors .....

                If file "ui_device.h " is "produced" - where is it ?
                It seems logical the compiler has to be made aware of it - using "include ".
                Is there any other way to make sure it is being created ?

                • You will also have files banana.cpp and banana.h, which you can edit for your own code.
                • banana.cpp will have a #include "ui_banana.h" line and a #include "banana.h" line.

                So if (?) "device.ui" is read - why my change in the actual l form did not take?

                Maybe when you answer questions in my previous post about what you might mean by "I exit the QTDesigner and go back to QTCreator only to find out ..." we may know.

                JonBJ 1 Reply Last reply
                0
                • A Anonymous_Banned275

                  @JonB said in How to remove manually created form and replace with QTDesigner creatted one.:

                  @AnneRanch
                  When you create a form in Designer (that's the word it uses for a "visual widget you design") you might call it form or device or banana. Let's say it's banana. Then:

                  • The Designer file for the form (visual widgets) will be banana.ui.
                  • When uic banana.ui gets run it will produce a file named ui_banana.h.

                  I have deleted existing references ( include ) to my ui_device .h .
                  Run "clear" AND "rebuild" .

                  It failed with multiple errors .....

                  If file "ui_device.h " is "produced" - where is it ?
                  It seems logical the compiler has to be made aware of it - using "include ".
                  Is there any other way to make sure it is being created ?

                  • You will also have files banana.cpp and banana.h, which you can edit for your own code.
                  • banana.cpp will have a #include "ui_banana.h" line and a #include "banana.h" line.

                  So if (?) "device.ui" is read - why my change in the actual l form did not take?

                  Maybe when you answer questions in my previous post about what you might mean by "I exit the QTDesigner and go back to QTCreator only to find out ..." we may know.

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

                  @AnneRanch said in How to remove manually created form and replace with QTDesigner creatted one.:

                  If file "ui_device.h " is "produced" - where is it ?

                  Your ui_device.h should be being produced in the "build output directory", for which ever configuration *debug, release, ...) you are building for. Cannot say for sure where yours is, depends on your configuration settings. I often put mine in a difference place. If you are using the default I think you go to the parent of the directory containing your source files and look for a directory named something like build-projectname-debug.... Your compiler's .o files are there, as is your executable.

                  If you have a ui_....h file in the same directory as your source files (where the ....ui file is), that is bad, try deleting it.

                  Do not delete your .ui files though till you are sure what is going on! Keep a backup copy.

                  I have deleted existing references ( include ) to my ui_device .h .

                  If you remove the #include "ui_device.h" line from your device.cpp file it will not compile. ui_device.h holds the C++ generated from the .ui, and your device.cpp will likely be making lots of references to its content.

                  1 Reply Last reply
                  1
                  • A Offline
                    A Offline
                    Anonymous_Banned275
                    wrote on last edited by Anonymous_Banned275
                    #21

                    The discussion will not resolve the issue by repeating the same...

                    Now let's answer this riddle

                    • used as a troubleshooting aid-

                    I added "go to slot " function in QTDesigner (file) activated by "pressing the button" on the form in question. It shows in QTCreator in all usual places without any additional need for verification of any of the files involved.

                    it works as expected

                    my conclusion
                    the file / form was saved / updated/ complied /uic etc. and processed correctly

                    so WHY same is not happening when text of the button is changed ?

                    what is the difference ?

                    ADDENDUM (APR 30)
                    AFTER a source files are renamed and project is saved / rebuild , then the
                    "created " ui_device.h file STILL refers to the original "device.ui" which no longer exist.

                    ecfd4509-3a54-4fc8-92e9-865a5136ba88-image.png

                    807cd831-54df-4ccb-a4c5-ce4a72f3f4c4-image.png

                    speculation:

                    either uic is bogus or the original file is still used ( most likely ).

                    JonBJ 1 Reply Last reply
                    0
                    • Christian EhrlicherC Offline
                      Christian EhrlicherC Offline
                      Christian Ehrlicher
                      Lifetime Qt Champion
                      wrote on last edited by
                      #22

                      As already said - you most likely have another generated file somewhere in your compiler search path - you're doing a lot of strange things so this is the most likely version.
                      Remove all occurrences of ui_*.h and compile your application. Then this file is re-generated and used by the compiler.
                      Neither QtCreator nor the compiler can do anything against your strange way copying data around...

                      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                      Visit the Qt Academy at https://academy.qt.io/catalog

                      1 Reply Last reply
                      1
                      • A Anonymous_Banned275

                        The discussion will not resolve the issue by repeating the same...

                        Now let's answer this riddle

                        • used as a troubleshooting aid-

                        I added "go to slot " function in QTDesigner (file) activated by "pressing the button" on the form in question. It shows in QTCreator in all usual places without any additional need for verification of any of the files involved.

                        it works as expected

                        my conclusion
                        the file / form was saved / updated/ complied /uic etc. and processed correctly

                        so WHY same is not happening when text of the button is changed ?

                        what is the difference ?

                        ADDENDUM (APR 30)
                        AFTER a source files are renamed and project is saved / rebuild , then the
                        "created " ui_device.h file STILL refers to the original "device.ui" which no longer exist.

                        ecfd4509-3a54-4fc8-92e9-865a5136ba88-image.png

                        807cd831-54df-4ccb-a4c5-ce4a72f3f4c4-image.png

                        speculation:

                        either uic is bogus or the original file is still used ( most likely ).

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

                        @AnneRanch said in How to remove manually created form and replace with QTDesigner creatted one.:

                        The discussion will not resolve the issue by repeating the same...

                        The discussion will not be resolved by not acting on what we try to tell you repeatedly!

                        What have you done about:

                        If you have a ui_....h file in the same directory as your source files (where the ....ui file is), that is bad, try deleting it.

                        ?

                        b. It appears that there are at lest TWO "device.ui" - therefore which one is being run - by "uic" ?

                        There cannot be two files named device.ui in the same directory. So they must presumably be in different directories.

                        • If you want to know which one where is being written to by Designer, make a change in Designer, save, and look at the file modification time on each of the .ui files.

                        • If you want to know which one is being read by uic, temporarily rename/move the .ui files one at a time, which one causes the build to complain?

                        • If you want to know where/when uic is putting the ui_....h file it generates from the .ui, remove all ui_....h files from source and build output directories, rebuild, and see where it appears.

                        1 Reply Last reply
                        0
                        • A Offline
                          A Offline
                          Anonymous_Banned275
                          wrote on last edited by Anonymous_Banned275
                          #24

                          @Christian-Ehrlicher said in How to remove manually created form and replace with QTDesigner creatted one.:

                          As already said - you most likely have another generated file somewhere in your compiler search path - you're doing a lot of strange things so this is the most likely version.
                          Remove all occurrences of ui_*.h and compile your application. Then this file is re-generated and used by the compiler.

                          I have renamed the only occurrence of ui_device.h - in source folder.

                          Here is the compiler result building ONLY the btscanner project :

                          09:51:24: Running steps for project MDI_BT...
                          09:51:24: Starting: "/usr/bin/make" clean -j4
                          rm -f moc_predefs.h
                          rm -f moc_service.cpp moc_test_device.cpp
                          rm -f ui_service.h ui_test_device.h
                          rm -f main.o service.o test_device.o moc_service.o moc_test_device.o
                          rm -f *~ core *.core
                          09:51:25: The process "/usr/bin/make" exited normally.
                          09:51:25: Starting: "/media/q5/MDI/QT_PROGRAMS/QT/15/5.15.2/gcc_64/bin/qmake" /mnt/sde5/QT_PROGRAMS_FULL/SOURCE/bluetooth/btscanner/btscanner.pro -spec linux-g++ CONFIG+=debug CONFIG+=qml_debug
                          Project MESSAGE: Added btscanner lbrary
                          Project MESSAGE: TEST message btscanner.pro
                          WARNING: Failure to find: test_device.ui
                          09:51:26: The process "/media/q5/MDI/QT_PROGRAMS/QT/15/5.15.2/gcc_64/bin/qmake" exited normally.
                          09:51:26: Starting: "/usr/bin/make" -f /media/q5/MDI/QT_PROGRAMS/SOURCE/bluetooth/btscanner/Makefile qmake_all
                          make: Nothing to be done for 'qmake_all'.
                          09:51:26: The process "/usr/bin/make" exited normally.
                          09:51:26: Starting: "/usr/bin/make" -j4
                          /media/q5/MDI/QT_PROGRAMS/QT/15/5.15.2/gcc_64/bin/uic /mnt/sde5/QT_PROGRAMS_FULL/SOURCE/bluetooth/btscanner/service.ui -o ui_service.h
                          make: *** No rule to make target 'test_device.ui', needed by 'ui_test_device.h'. Stop.
                          make: *** Waiting for unfinished jobs....
                          09:51:26: The process "/usr/bin/make" exited with code 2.
                          Error while building/deploying project MDI_BT (kit: Replacement for "Desktop Qt 6.2.3 GCC 64bit")
                          When executing step "Make"
                          09:51:26: Elapsed time: 00:02.

                          Does this verify that there is only one , in this case nonexistent , ui_deviuce .h" file ?

                          Should I rebuild the ENTIRE project ?

                          BTW
                          Another anomaly
                          during project compile I get flash of real error , as expected, but then the error message is nowhere to be found in regular expected places.

                          PS
                          THe expected error shows up in "issues" when entire project is build

                          :-1: error: No rule to make target 'test_device.ui', needed by 'ui_test_device.h'. Stop.

                          I believe this exercise confirms that the ui_xxx file is NOT regenerated when changes to the "form" are made.

                          Now what ??

                          Neither QtCreator nor the compiler can do anything against your strange way copying data around...

                          Christian EhrlicherC JonBJ 2 Replies Last reply
                          0
                          • A Anonymous_Banned275

                            @Christian-Ehrlicher said in How to remove manually created form and replace with QTDesigner creatted one.:

                            As already said - you most likely have another generated file somewhere in your compiler search path - you're doing a lot of strange things so this is the most likely version.
                            Remove all occurrences of ui_*.h and compile your application. Then this file is re-generated and used by the compiler.

                            I have renamed the only occurrence of ui_device.h - in source folder.

                            Here is the compiler result building ONLY the btscanner project :

                            09:51:24: Running steps for project MDI_BT...
                            09:51:24: Starting: "/usr/bin/make" clean -j4
                            rm -f moc_predefs.h
                            rm -f moc_service.cpp moc_test_device.cpp
                            rm -f ui_service.h ui_test_device.h
                            rm -f main.o service.o test_device.o moc_service.o moc_test_device.o
                            rm -f *~ core *.core
                            09:51:25: The process "/usr/bin/make" exited normally.
                            09:51:25: Starting: "/media/q5/MDI/QT_PROGRAMS/QT/15/5.15.2/gcc_64/bin/qmake" /mnt/sde5/QT_PROGRAMS_FULL/SOURCE/bluetooth/btscanner/btscanner.pro -spec linux-g++ CONFIG+=debug CONFIG+=qml_debug
                            Project MESSAGE: Added btscanner lbrary
                            Project MESSAGE: TEST message btscanner.pro
                            WARNING: Failure to find: test_device.ui
                            09:51:26: The process "/media/q5/MDI/QT_PROGRAMS/QT/15/5.15.2/gcc_64/bin/qmake" exited normally.
                            09:51:26: Starting: "/usr/bin/make" -f /media/q5/MDI/QT_PROGRAMS/SOURCE/bluetooth/btscanner/Makefile qmake_all
                            make: Nothing to be done for 'qmake_all'.
                            09:51:26: The process "/usr/bin/make" exited normally.
                            09:51:26: Starting: "/usr/bin/make" -j4
                            /media/q5/MDI/QT_PROGRAMS/QT/15/5.15.2/gcc_64/bin/uic /mnt/sde5/QT_PROGRAMS_FULL/SOURCE/bluetooth/btscanner/service.ui -o ui_service.h
                            make: *** No rule to make target 'test_device.ui', needed by 'ui_test_device.h'. Stop.
                            make: *** Waiting for unfinished jobs....
                            09:51:26: The process "/usr/bin/make" exited with code 2.
                            Error while building/deploying project MDI_BT (kit: Replacement for "Desktop Qt 6.2.3 GCC 64bit")
                            When executing step "Make"
                            09:51:26: Elapsed time: 00:02.

                            Does this verify that there is only one , in this case nonexistent , ui_deviuce .h" file ?

                            Should I rebuild the ENTIRE project ?

                            BTW
                            Another anomaly
                            during project compile I get flash of real error , as expected, but then the error message is nowhere to be found in regular expected places.

                            PS
                            THe expected error shows up in "issues" when entire project is build

                            :-1: error: No rule to make target 'test_device.ui', needed by 'ui_test_device.h'. Stop.

                            I believe this exercise confirms that the ui_xxx file is NOT regenerated when changes to the "form" are made.

                            Now what ??

                            Neither QtCreator nor the compiler can do anything against your strange way copying data around...

                            Christian EhrlicherC Offline
                            Christian EhrlicherC Offline
                            Christian Ehrlicher
                            Lifetime Qt Champion
                            wrote on last edited by
                            #25

                            @AnneRanch said in How to remove manually created form and replace with QTDesigner creatted one.:

                            make: *** No rule to make target 'test_device.ui', needed by 'ui_test_device.h'. Stop.

                            So is there actually a test_device.ui in /media/q5/MDI/QT_PROGRAMS/SOURCE/bluetooth/btscanner/ ? If not remove it from your pro-file and start over...

                            I have renamed the only occurrence of ui_device.h - in source folder.

                            Told you already more than ten times - the generated files must not be in your source directory...

                            Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                            Visit the Qt Academy at https://academy.qt.io/catalog

                            1 Reply Last reply
                            1
                            • A Anonymous_Banned275

                              @Christian-Ehrlicher said in How to remove manually created form and replace with QTDesigner creatted one.:

                              As already said - you most likely have another generated file somewhere in your compiler search path - you're doing a lot of strange things so this is the most likely version.
                              Remove all occurrences of ui_*.h and compile your application. Then this file is re-generated and used by the compiler.

                              I have renamed the only occurrence of ui_device.h - in source folder.

                              Here is the compiler result building ONLY the btscanner project :

                              09:51:24: Running steps for project MDI_BT...
                              09:51:24: Starting: "/usr/bin/make" clean -j4
                              rm -f moc_predefs.h
                              rm -f moc_service.cpp moc_test_device.cpp
                              rm -f ui_service.h ui_test_device.h
                              rm -f main.o service.o test_device.o moc_service.o moc_test_device.o
                              rm -f *~ core *.core
                              09:51:25: The process "/usr/bin/make" exited normally.
                              09:51:25: Starting: "/media/q5/MDI/QT_PROGRAMS/QT/15/5.15.2/gcc_64/bin/qmake" /mnt/sde5/QT_PROGRAMS_FULL/SOURCE/bluetooth/btscanner/btscanner.pro -spec linux-g++ CONFIG+=debug CONFIG+=qml_debug
                              Project MESSAGE: Added btscanner lbrary
                              Project MESSAGE: TEST message btscanner.pro
                              WARNING: Failure to find: test_device.ui
                              09:51:26: The process "/media/q5/MDI/QT_PROGRAMS/QT/15/5.15.2/gcc_64/bin/qmake" exited normally.
                              09:51:26: Starting: "/usr/bin/make" -f /media/q5/MDI/QT_PROGRAMS/SOURCE/bluetooth/btscanner/Makefile qmake_all
                              make: Nothing to be done for 'qmake_all'.
                              09:51:26: The process "/usr/bin/make" exited normally.
                              09:51:26: Starting: "/usr/bin/make" -j4
                              /media/q5/MDI/QT_PROGRAMS/QT/15/5.15.2/gcc_64/bin/uic /mnt/sde5/QT_PROGRAMS_FULL/SOURCE/bluetooth/btscanner/service.ui -o ui_service.h
                              make: *** No rule to make target 'test_device.ui', needed by 'ui_test_device.h'. Stop.
                              make: *** Waiting for unfinished jobs....
                              09:51:26: The process "/usr/bin/make" exited with code 2.
                              Error while building/deploying project MDI_BT (kit: Replacement for "Desktop Qt 6.2.3 GCC 64bit")
                              When executing step "Make"
                              09:51:26: Elapsed time: 00:02.

                              Does this verify that there is only one , in this case nonexistent , ui_deviuce .h" file ?

                              Should I rebuild the ENTIRE project ?

                              BTW
                              Another anomaly
                              during project compile I get flash of real error , as expected, but then the error message is nowhere to be found in regular expected places.

                              PS
                              THe expected error shows up in "issues" when entire project is build

                              :-1: error: No rule to make target 'test_device.ui', needed by 'ui_test_device.h'. Stop.

                              I believe this exercise confirms that the ui_xxx file is NOT regenerated when changes to the "form" are made.

                              Now what ??

                              Neither QtCreator nor the compiler can do anything against your strange way copying data around...

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

                              @AnneRanch said in How to remove manually created form and replace with QTDesigner creatted one.:

                              :-1: error: No rule to make target 'test_device.ui', needed by 'ui_test_device.h'. Stop.

                              I believe this exercise confirms that the ui_xxx file is NOT regenerated when changes to the "form" are made.

                              It tells you it is indeed trying to regenerate ui_test_device.h file from test_device.ui, by running uic on it, but it cannot find a source file test_device.ui. Has it always been like this, or is it because you have renamed/moved test_device.ui? Where is your test_device.ui file?

                              Your project build shows line:

                              WARNING: Failure to find: test_device.ui

                              As long as that and/or the other error are occurring, changes saved into the .ui file e.g. from Designer are not being reflected in your rebuilt executable.

                              So the exercise shows that the ui_xxx file IS TRYING TO BE regenerated when changes to the "form" are made

                              1 Reply Last reply
                              0

                              • Login

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