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. Feasibility of embedding a QWidget app in a .NET/WPF project?

Feasibility of embedding a QWidget app in a .NET/WPF project?

Scheduled Pinned Locked Moved Unsolved General and Desktop
7 Posts 3 Posters 2.8k 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.
  • P Offline
    P Offline
    pmh4514
    wrote on last edited by
    #1

    Hi, I'm brainstorming possibilities for integrating my own QWidgets based windows application with a partner's .NET/WPF application. (Two business colleagues having built complementary software tools exploring integration options that don't involve a rewrite.)

    Running two EXE processes and positioning them side by side on screen "works" but is ugly and puts the applications in two memory spaces.

    In a nutshell my question is, is there a known way, is it feasible to turn my QMainWindow app into a "User Control" which the .NET/WFP software application could embed within its own GUI?

    A 1 Reply Last reply
    0
    • P pmh4514

      Hi, I'm brainstorming possibilities for integrating my own QWidgets based windows application with a partner's .NET/WPF application. (Two business colleagues having built complementary software tools exploring integration options that don't involve a rewrite.)

      Running two EXE processes and positioning them side by side on screen "works" but is ugly and puts the applications in two memory spaces.

      In a nutshell my question is, is there a known way, is it feasible to turn my QMainWindow app into a "User Control" which the .NET/WFP software application could embed within its own GUI?

      A Offline
      A Offline
      ambershark
      wrote on last edited by
      #2

      @pmh4514 That's more of a .NET question. If you were asking the reverse, i.e. can you turn a .NET app into a QWidget inside a Qt app, then it would be a little more answerable here.

      As an tentative answer, yes you could do this. Not so much with Qt but with raw winapi code. It isn't easy and it's probably not a great thing to spend your time on.

      Depending on the size of your buddy's project I think the time would be better spent rewriting the GUI to Qt, or vice versa your GUI to .NET. Being the Qt forums you know which direction I'd prefer if it were my project. ;)

      If your buddy developed his app correctly, separating out logic from GUI, transitioning it to a new GUI like Qt should only be a week or so of work if it's a small-medium sized project. If there is tons of logic embedded in GUI stuff, well then you're looking at a LOT more work and a potential rewrite.

      Finally, I know of no way with Qt directly to encase a window inside a Qt widget. It may be possible but no solution pops into my head.

      My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

      P 2 Replies Last reply
      1
      • A ambershark

        @pmh4514 That's more of a .NET question. If you were asking the reverse, i.e. can you turn a .NET app into a QWidget inside a Qt app, then it would be a little more answerable here.

        As an tentative answer, yes you could do this. Not so much with Qt but with raw winapi code. It isn't easy and it's probably not a great thing to spend your time on.

        Depending on the size of your buddy's project I think the time would be better spent rewriting the GUI to Qt, or vice versa your GUI to .NET. Being the Qt forums you know which direction I'd prefer if it were my project. ;)

        If your buddy developed his app correctly, separating out logic from GUI, transitioning it to a new GUI like Qt should only be a week or so of work if it's a small-medium sized project. If there is tons of logic embedded in GUI stuff, well then you're looking at a LOT more work and a potential rewrite.

        Finally, I know of no way with Qt directly to encase a window inside a Qt widget. It may be possible but no solution pops into my head.

        P Offline
        P Offline
        pmh4514
        wrote on last edited by
        #3

        @ambershark
        Thanks for the reply. This is pretty much inline with my thinking just want to be educated on options.

        1 Reply Last reply
        0
        • A ambershark

          @pmh4514 That's more of a .NET question. If you were asking the reverse, i.e. can you turn a .NET app into a QWidget inside a Qt app, then it would be a little more answerable here.

          As an tentative answer, yes you could do this. Not so much with Qt but with raw winapi code. It isn't easy and it's probably not a great thing to spend your time on.

          Depending on the size of your buddy's project I think the time would be better spent rewriting the GUI to Qt, or vice versa your GUI to .NET. Being the Qt forums you know which direction I'd prefer if it were my project. ;)

          If your buddy developed his app correctly, separating out logic from GUI, transitioning it to a new GUI like Qt should only be a week or so of work if it's a small-medium sized project. If there is tons of logic embedded in GUI stuff, well then you're looking at a LOT more work and a potential rewrite.

          Finally, I know of no way with Qt directly to encase a window inside a Qt widget. It may be possible but no solution pops into my head.

          P Offline
          P Offline
          pmh4514
          wrote on last edited by
          #4

          @ambershark
          Actually, this is interesting:
          http://doc.qt.io/qt-5/activeqt-dotnet.html

          A 1 Reply Last reply
          0
          • P pmh4514

            @ambershark
            Actually, this is interesting:
            http://doc.qt.io/qt-5/activeqt-dotnet.html

            A Offline
            A Offline
            ambershark
            wrote on last edited by
            #5

            @pmh4514 said in Feasibility of embedding a QWidget app in a .NET/WPF project?:

            @ambershark
            Actually, this is interesting:
            http://doc.qt.io/qt-5/activeqt-dotnet.html

            @pmh4514 It is indeed. That may allow him to put your QtWidgets into his window. I don't think it would allow putting a .NET component into a Qt Widget though. But I admit I only skimmed it as my interest in .NET is minimal at best. ;)

            My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

            P 1 Reply Last reply
            0
            • A ambershark

              @pmh4514 said in Feasibility of embedding a QWidget app in a .NET/WPF project?:

              @ambershark
              Actually, this is interesting:
              http://doc.qt.io/qt-5/activeqt-dotnet.html

              @pmh4514 It is indeed. That may allow him to put your QtWidgets into his window. I don't think it would allow putting a .NET component into a Qt Widget though. But I admit I only skimmed it as my interest in .NET is minimal at best. ;)

              P Offline
              P Offline
              pmh4514
              wrote on last edited by
              #6

              @ambershark

              mine as well.

              the goal would be to do just that though - drop my QMainWindow into his .NET window.

              1 Reply Last reply
              1
              • E Offline
                E Offline
                emmenlau
                wrote on last edited by
                #7

                Hi @pmh4514 , did you actually get your project working? We are curious to try just that, embedding a QGraphicsView (or a full QMainWindow) in a WPF GUI. Did it ever work for you?

                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