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
QtWS25 Last Chance

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.1k 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 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?

    JonBJ 1 Reply Last reply
    0
    • A Alhazred

      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?

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on 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 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.

        JonBJ T 2 Replies Last reply
        0
        • A Alhazred has marked this topic as solved on
        • A Alhazred

          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.

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on 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

            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 last edited by
            #5

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

            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