Results 1 to 5 of 5

Thread: Combine two QT projects

  1. #1
    Join Date
    Mar 2012
    Posts
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Question Combine two QT projects

    How to cobine two qt projects.say 1.pro and 2.pro

  2. #2
    Join Date
    Sep 2011
    Posts
    1,241
    Thanks
    3
    Thanked 127 Times in 126 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Combine two QT projects

    What does each pro make? a dll? an executable?

    What is the output that you desire?
    If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.

  3. #3
    Join Date
    May 2012
    Location
    Bangalore, India
    Posts
    271
    Thanks
    29
    Thanked 50 Times in 47 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Combine two QT projects

    make the .pri file of one project and include that .pri file in other .pro file. Or simply cut and paste the first project code into the other one.
    Heavy Metal Rules. For those about to rock, we salute you.
    HIT THANKS IF I HELPED.

  4. #4
    Join Date
    May 2016
    Posts
    1
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Re: Combine two QT projects

    I copy pasted the first Project 2's code into Project 1 and it gives me a segmentation fault. Project 1 & 2 execute well on their own, when combined it seg faults at Project 2's code. Is there a memory stack limitation for each project in qt?

  5. #5
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Combine two QT projects

    In general you can't just blindly copy and paste all of the code from one project into another and expect it to compile and run with no changes.

    Make a debug version of the project, run it in the debugger and examine the stack trace when the seg fault occurs. That will give you a clue about where to start looking for the source of the problem.

    A seg fault usually means you are trying to access something through an uninitialized pointer, violating the bounds of an array by using an invalid index, using a null pointer, something in your program has corrupted the stack, or any number of other things.

Similar Threads

  1. Combine Widgets in a new class
    By sedi in forum Newbie
    Replies: 2
    Last Post: 30th January 2012, 11:25
  2. combine Symbian C++ and Qt
    By Manjula in forum Newbie
    Replies: 0
    Last Post: 9th March 2011, 15:53
  3. Replies: 2
    Last Post: 7th September 2010, 22:19
  4. Qt Assistant how to combine QtAssistant with Eclipse?
    By silence in forum Qt Tools
    Replies: 1
    Last Post: 14th April 2010, 13:25
  5. Combine C++ Qt with PyQT
    By NoRulez in forum Qt Programming
    Replies: 1
    Last Post: 7th January 2009, 17:14

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.