Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Design Tooling
  3. Qt Design Studio
  4. Can't give to an element a name used in the past and then removed
Forum Updated to NodeBB v4.3 + New Features

Can't give to an element a name used in the past and then removed

Scheduled Pinned Locked Moved Solved Qt Design Studio
5 Posts 3 Posters 1.2k Views
  • 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 Offline
    A Offline
    Alhazred
    wrote on 30 Dec 2024, 23:36 last edited by
    #1

    I am adding a menu to a QMainWindow, I added a submenu item and gave to it the objectName of "actionCrNew", then I decided to have that submenu item under a different menu.
    I deleted the previous submenu item and created a new one under the other menu and tired to assign to it the objectName "actionCrNew", but it is automatically renamed to "actionCrNew_2".
    I could understand that if I didn't remove the previous item, but it doesn't exist anymore, I deleted it, why can't I use again that name if no other element has it? I even tried to close and open Design Studio again, but nothing changed, that name can't be used anymore.
    Any idea about what is happening? What should I do to be able to use again that name?

    J 1 Reply Last reply 31 Dec 2024, 09:15
    0
    • A Alhazred
      30 Dec 2024, 23:36

      I am adding a menu to a QMainWindow, I added a submenu item and gave to it the objectName of "actionCrNew", then I decided to have that submenu item under a different menu.
      I deleted the previous submenu item and created a new one under the other menu and tired to assign to it the objectName "actionCrNew", but it is automatically renamed to "actionCrNew_2".
      I could understand that if I didn't remove the previous item, but it doesn't exist anymore, I deleted it, why can't I use again that name if no other element has it? I even tried to close and open Design Studio again, but nothing changed, that name can't be used anymore.
      Any idea about what is happening? What should I do to be able to use again that name?

      J Online
      J Online
      JonB
      wrote on 31 Dec 2024, 09:15 last edited by JonB
      #2

      @Alhazred
      You have posted this into Qt Design Studio sub-forum. But I don't think that is what you are using, are you just using Qt Creator which includes Qt Designer (different from Design Studio) where you create widgets interactively?

      Assuming so, all of your work is saved in a .ui file. That is an XML file, so you can view/edit it in a text editor. Go search it for the symbol you say is deleted and want to re-use, to see what is going on. If you are careful you can remove or maybe rename it.

      I'm not at all sure, but because it was a menu there may be either a QMenu or a QAction left lying around which still uses that name.

      If you are indeed using Design Studio then I don't know how that works.

      1 Reply Last reply
      0
      • A Offline
        A Offline
        Alhazred
        wrote on 31 Dec 2024, 09:32 last edited by Alhazred
        #3

        Thank you for your reply.
        I am developing the application using Visual Studio Community 2022 and I am using Qt Design Studio 4.6 (4.6.2) to interactively create the UI.
        By the way, manually removing the elements from the .ui file did help. No clue why Design Studio doesn't do that by itself when deleting elements from it.

        J T 2 Replies Last reply 31 Dec 2024, 09:38
        0
        • A Alhazred has marked this topic as solved on 31 Dec 2024, 09:32
        • A Alhazred
          31 Dec 2024, 09:32

          Thank you for your reply.
          I am developing the application using Visual Studio Community 2022 and I am using Qt Design Studio 4.6 (4.6.2) to interactively create the UI.
          By the way, manually removing the elements from the .ui file did help. No clue why Design Studio doesn't do that by itself when deleting elements from it.

          J Online
          J Online
          JonB
          wrote on 31 Dec 2024, 09:38 last edited by JonB
          #4

          @Alhazred
          OK, I didn't know whether Design Studio functions similarly to Designer. It looks like it too just uses a .ui file to save everything the user designs.

          I have to say that looking back at your past posts they seem to be to do with widgets and code etc. For which Designer would have seemed enough. I don't know why you have elected to use Design Studio, which as I understand it is for advanced, specialized graphics, and is used to generate QML not widgets code. But you may know more than I.

          1 Reply Last reply
          0
          • A Alhazred
            31 Dec 2024, 09:32

            Thank you for your reply.
            I am developing the application using Visual Studio Community 2022 and I am using Qt Design Studio 4.6 (4.6.2) to interactively create the UI.
            By the way, manually removing the elements from the .ui file did help. No clue why Design Studio doesn't do that by itself when deleting elements from it.

            T Offline
            T Offline
            Tim.Jenssen
            wrote on 3 Jan 2025, 12:36 last edited by
            #5

            @Alhazred please create a report https://bugreports.qt.io/secure/CreateIssue!default.jspa

            1 Reply Last reply
            0

            3/5

            31 Dec 2024, 09:32

            • Login

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