Results 1 to 4 of 4

Thread: Best practice question for 2 applications

  1. #1
    Join Date
    Jan 2011
    Location
    Richmond, VA
    Posts
    94
    Thanks
    14
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Best practice question for 2 applications

    Good morning, all --

    I've got a best practice question...I have a non-Qt application that I want to call from my Qt app and I'm wondering what are people's recommendations on the best way to do this in order to, effectively, only have 1 application for deployment reasons...Should I integrate all the code from my non-Qt app into my Qt one, or should I just link in the executable? This is all new ground for me...

    Thanks!


    scott

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

    Default Re: Best practice question for 2 applications

    You cant link binaries. You can only link static or shared libs... you should make a library from the functionality in the non-Qt app that you want to share, and include/link it in your new app.
    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
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: Best practice question for 2 applications

    you can create a sub project (.pro file) for the non-Qt app, then include it from the Qt App, this way all the code can be managed from a single main project. Also you can configure the sub project not to use Qt library. It means you will manage the non-Qt project with qmake and not use any Qt libs

  4. #4
    Join Date
    Jan 2011
    Location
    Richmond, VA
    Posts
    94
    Thanks
    14
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Best practice question for 2 applications

    Thanks for both these answers! Not quite what I expected, but that's why I asked!

    @amleto -- I had originally been thinking about linking in the binary but thanks for pointing out that that won't work...As I said, I'm plowing new territory and the only experience I have is with linking C routines years and years and years ago so I don't remember what I can and can't do...I'd thought about the library approach and while I may not know the details of how to make that happen it seems obvious from a rational point of view...

    @Santosh -- the sub-project is pure C++ so configuring it to not use Qt libraries is a pretty logical approach...I'll do some searching to figure out how to pull this off...


    Creative answers and I appreciate it! Time's running short for me and all help has been appreciated...



    scott

Similar Threads

  1. Touchscreen Best Practice ?
    By vendra in forum Newbie
    Replies: 1
    Last Post: 11th January 2011, 12:43
  2. customizing widget layout: best practice
    By stillwaiting in forum Newbie
    Replies: 5
    Last Post: 23rd December 2010, 23:30
  3. Best practice to implement a graphic item
    By Jon Heron in forum Newbie
    Replies: 1
    Last Post: 4th December 2010, 22:20
  4. what's the better practice?
    By xyzt in forum Qt Programming
    Replies: 1
    Last Post: 22nd March 2008, 18:42
  5. QDataWidgetMapper <=> QComboBox best practice
    By saknopper in forum Qt Programming
    Replies: 1
    Last Post: 18th January 2007, 10:50

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.