Results 1 to 3 of 3

Thread: Path to the previous folder

  1. #1
    Join Date
    Dec 2007
    Posts
    28
    Thanks
    18
    Qt products
    Qt4
    Platforms
    Windows

    Default Path to the previous folder

    Hi

    I've stupid problem... I don't know how to give a correct path to the previous folder or file. In my project I've folder where I keep sources.cpp but header isn't in this folder, so how can I give path of the header to the sources? Have I write
    Qt Code:
    1. #include "/home/zerg/workspace/header.h"
    To copy to clipboard, switch view to plain text mode 
    ?

    example

    header.h
    [FOLDER] - > source1.cpp , source2.cpp

    by default it is
    Qt Code:
    1. #include "header.h
    To copy to clipboard, switch view to plain text mode 
    but it's wrong because header isn't in the same folder...

    ps
    sorry for chaos of this post ;p If in this post are any mistakes pleas correct me ;d

    Best Regards

  2. #2
    Join Date
    Jul 2006
    Location
    Atlanta, GA
    Posts
    86
    Thanks
    26
    Thanked 6 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Path to the previous folder

    ../ in linux ..\ in windows
    fnmblot
    --------------------------------------
    Gee Ricky, I'm sorry your mom blew up.

  3. The following user says thank you to fnmblot for this useful post:

    Zergi (15th July 2008)

  4. #3
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,518 Times in 1,388 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Path to the previous folder

    Use INCLUDEPATH:
    Qt Code:
    1. INCLUDEPATH += path/to/headers
    To copy to clipboard, switch view to plain text mode 
    J-P Nurmi

  5. The following user says thank you to jpn for this useful post:

    Zergi (15th July 2008)

Similar Threads

  1. remember file path
    By eric in forum Qt Programming
    Replies: 2
    Last Post: 1st April 2008, 16:52
  2. how do I get the default picture path of qtopia 2.2
    By pencilren in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 17th September 2007, 09:01
  3. Qt Cryptographic Architecture
    By vermarajeev in forum Qt Programming
    Replies: 6
    Last Post: 9th February 2007, 13:15
  4. Which path should I use?
    By Dark_Tower in forum Newbie
    Replies: 3
    Last Post: 8th April 2006, 12:09

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.