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. Convert one project mainwindow in one .dll
Qt 6.11 is out! See what's new in the release blog

Convert one project mainwindow in one .dll

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 2 Posters 1.7k 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.
  • J Offline
    J Offline
    Jeronimo
    wrote on last edited by
    #1

    Hi i have many features in my main windows. I was thinking to take like .dll and extend to my main program. This is possible? Thx again!

    jsulmJ 1 Reply Last reply
    0
    • J Jeronimo

      Hi i have many features in my main windows. I was thinking to take like .dll and extend to my main program. This is possible? Thx again!

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

      @Jeronimo It is possible. Add a shared lib to your project and in that shared lib add your main window.
      But I would not move UI stuff to a shared lib. I would move dedicated logic to shared libraries.

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

      J 1 Reply Last reply
      0
      • jsulmJ jsulm

        @Jeronimo It is possible. Add a shared lib to your project and in that shared lib add your main window.
        But I would not move UI stuff to a shared lib. I would move dedicated logic to shared libraries.

        J Offline
        J Offline
        Jeronimo
        wrote on last edited by
        #3

        @jsulm A ok so first i convert my program to .dll and then in a new program with a new mainwindow i include it? thx sorry but i'm little lost

        jsulmJ 1 Reply Last reply
        0
        • J Jeronimo

          @jsulm A ok so first i convert my program to .dll and then in a new program with a new mainwindow i include it? thx sorry but i'm little lost

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

          @Jeronimo No need to convert your current project. Create new one as Library and in the current project you then add a reference to that library (right click on the project then "Add Library...").

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

          J 1 Reply Last reply
          0
          • jsulmJ jsulm

            @Jeronimo No need to convert your current project. Create new one as Library and in the current project you then add a reference to that library (right click on the project then "Add Library...").

            J Offline
            J Offline
            Jeronimo
            wrote on last edited by
            #5

            @jsulm said in Convert one project mainwindow in one .dll:

            Create new one as Library and in the current project you then add a reference to that library

            If i understand goo i create new library in the project that i want to reference¿ ? and in the new add reference at this library? i'm right? sorry for repeating but it's for being sure.

            jsulmJ 1 Reply Last reply
            0
            • J Jeronimo

              @jsulm said in Convert one project mainwindow in one .dll:

              Create new one as Library and in the current project you then add a reference to that library

              If i understand goo i create new library in the project that i want to reference¿ ? and in the new add reference at this library? i'm right? sorry for repeating but it's for being sure.

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

              @Jeronimo No. You create a new project of type Library. In the old project you add a reference to this new library.
              Are you sure a shared library is the right solution? You want to simplify your main window. For that you can just create different widgets/dialogs in different ui/cpp files and then use them in your main window. This would be much easier. Shared libraries are useful if you want to split your application in smaller parts to be able to update it more easily or if the functionality of a library is used by more than one application.

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

              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