Page 2 of 2 FirstFirst 12
Results 21 to 25 of 25

Thread: KDevelop and Qt4

  1. #21
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: KDevelop and Qt4

    Quote Originally Posted by high_flyer
    Another option is just to add -lQt3Support to the external libraries in your project.
    What about #ifdef QT3_SUPPORT? There's a lot of them in Qt headers.

  2. #22
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: KDevelop and Qt4

    What about #ifdef QT3_SUPPORT? There's a lot of them in Qt headers.
    I am not syre what do you mean with that.
    You need to link against the Qt3 support lib if you want to use the Qt3 support classes...
    How do you want to uese the #ifdef for that? with adding dynamic linking in the code?
    Its possible, but lots of work... much easier just to add a -l to the libs list...

  3. #23
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: KDevelop and Qt4

    Quote Originally Posted by high_flyer
    much easier just to add a -l to the libs list...
    But adding -lQt3Support to LIBS is not enough.

    For example lets take QString header:
    Qt Code:
    1. ...
    2. #ifdef QT3_SUPPORT
    3. inline QT3_SUPPORT const char *ascii() const { return ascii_helper(); }
    4. inline QT3_SUPPORT const char *latin1() const { return latin1_helper(); }
    5. ...
    To copy to clipboard, switch view to plain text mode 
    Without QT3_SUPPORT defined, compiler won't see those methods.

    QT += something does more than LIBS += -lsometing.

  4. #24
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: KDevelop and Qt4

    oh, now I see what you meant...
    One sould ofcourse add the QT3_SUPPORT define to the make parameters under "build options->defines"

  5. #25
    Join Date
    Jul 2006
    Location
    Belgium
    Posts
    6
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: KDevelop and Qt4

    Quote Originally Posted by huet
    Hello,

    I am using Suse 10 with KDevelop 3.3.1 and Qt 4. I can compile my app and run it fine but unfortunately I lost the ability to debug it with breakpoints since I integrated Qt :-( I found a post on the web with the exact same problem and description (see below), but unfortunately no answer... I use CONFIG += qt debug thread warn_on and in the generated Makefile I set -g and -O0.
    It works on my system (Kdevelop 3.3.4 and Qt 4.1.4). In the .pro file, i have :
    QT = core gui debug
    CONFIG += debug warn_on
    Don't forget to clean the project, recompile it and run in debugger mode. If you modify settings in qmake manager it does not recompile by default.

    Cedric.

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.