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. Questions on difference between add in and creator
Forum Updated to NodeBB v4.3 + New Features

Questions on difference between add in and creator

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.1k 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.
  • R Offline
    R Offline
    ricky_ride
    wrote on last edited by
    #1

    Hi,

    I'm new in Qt family ! I have two questions about some differences in creator and Add in for visual studio.

    First, in Qt creator, when I create a project, I see a pointer on ui class like this : Ui::TestApp *ui; But in visual studio, I see Ui::TestAppClass ui; I don't understand why is not a pointer ...

    My seconde question is why in creator we need to delete ui and not in visual studio ?

    Thanks in advance.

    1 Reply Last reply
    0
    • C Offline
      C Offline
      ChrisW67
      wrote on last edited by
      #2

      There are three ways to use a Designer UI in your application; this is two of them. See "Using a Designer UI File in Your Application" in the Qt docs. Qt Creator can be configured to generate code in any of the styles. I cannot vouch for the VS add-in.

      If you incorporate the UI as a pointer member then you are responsible for allocation of the UI object on the heap and deleting later. If you incorporate the UI as a member variable then normal C++ scope rules ensure it is cleaned up. This is standard C++.

      1 Reply Last reply
      0
      • R Offline
        R Offline
        ricky_ride
        wrote on last edited by
        #3

        Hi

        Thanks for the answer !

        I'm using the add in of visual studio. I read the doc and in the case that I would create project with using a Pointer Member Variable. How do I ?

        thanks !

        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