Results 1 to 6 of 6

Thread: how to check the application product version??

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    8
    Thanked 133 Times in 128 Posts

    Default Re: how to check the application product version??

    i use my application's return value to determine various things

    MyApp
    Qt Code:
    1. #define VERSION 142 //version 1.4.2
    2.  
    3. int main(int argc,char** argv)
    4. {
    5. QApplication app(argc,argv);
    6. if(argc>1)
    7. {
    8. if(!strcmp(argv[1],"ReturnVersionAndExit");
    9. return VERSION;
    10. }
    11.  
    12. ....
    13. ....
    14. }
    To copy to clipboard, switch view to plain text mode 


    now your other qt application can start the QProcess with your application and check the code.

    check App

    Qt Code:
    1. QString program="myapp.exe";
    2. args<<"ReturnVersionAndExit";
    3.  
    4. int version=QProcess::execute(program,args);
    5. //voila!! u got the version.:D
    To copy to clipboard, switch view to plain text mode 

  2. The following user says thank you to nish for this useful post:

    Cantora (5th June 2009)

Similar Threads

  1. Deploy Qt application on Mac OS X
    By giandrea77 in forum Installation and Deployment
    Replies: 3
    Last Post: 11th February 2009, 09:34
  2. Designer doesn't load wwWidgets plugin
    By reimer in forum Installation and Deployment
    Replies: 21
    Last Post: 7th February 2009, 03:23
  3. Problem with application version and icon
    By cutie.monkey in forum Qt Programming
    Replies: 3
    Last Post: 18th December 2008, 01:22
  4. Distributing QT application for Mac OS
    By mb0 in forum Qt Programming
    Replies: 1
    Last Post: 31st May 2007, 18:59
  5. Replies: 15
    Last Post: 21st April 2007, 17:46

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
  •  
Qt is a trademark of The Qt Company.