Results 1 to 5 of 5

Thread: Qt and C application

  1. #1
    Join Date
    Jul 2008
    Posts
    40
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Qt and C application

    Is it possible to use Qt with a C application ?

    Thanks!

  2. #2
    Join Date
    Dec 2006
    Posts
    849
    Thanks
    6
    Thanked 163 Times in 151 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Qt and C application

    Not for a "pure" C app.
    So it depends on how you define a "C application". If you provide a C interface (i.e. use extern "C") that the Qt/C++ stuff can hide behind, then, yes, you can.
    (So you need C++ to use Qt, but you can often provide a C interface to your C++ code using Qt.)

    But you can use C with a Qt application.

    HTH

  3. #3
    Join Date
    Jul 2008
    Posts
    40
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Qt and C application

    I provide a Qt interface and a "pure" C code !!!
    So ?

    thanks

  4. #4
    Join Date
    Dec 2006
    Posts
    849
    Thanks
    6
    Thanked 163 Times in 151 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Qt and C application

    You can't.

    You need to use C++ code to program with Qt.
    You can (again in C++!) provide a C api to your gui code.
    Then call this C api from the rest of your app.
    Last edited by caduel; 23rd February 2009 at 17:38.

  5. #5
    Join Date
    Jul 2008
    Posts
    40
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Qt and C application

    thanks again

Similar Threads

  1. Qt Application + Web Integration -- Help needed
    By swamyonline in forum Qt Programming
    Replies: 0
    Last Post: 17th February 2009, 11:59
  2. Start Qt application as Windows Service
    By ^NyAw^ in forum Qt Programming
    Replies: 12
    Last Post: 10th May 2008, 17:23
  3. Loading library from application
    By mourad in forum Installation and Deployment
    Replies: 0
    Last Post: 2nd April 2008, 15:10
  4. dll + application
    By fpujol in forum Qt Programming
    Replies: 11
    Last Post: 15th April 2007, 18:37

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.