Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    [Solved]How to diffetentiate relative and absolute path

    General and Desktop
    1
    2
    479
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      ashokb last edited by

      Hi,

      I have a function with QString as parameter. I am expecting file path in that QString.
      my question is , can i detect whether that path is relative or absolute?
      eg. relative path "someFolder/subFolder/abc.jpg"
      absolute path "C:/Desktop/someFolder/subFolder/abc.jpg".
      Is there something like isRelative() or isAbsolute()?

      1 Reply Last reply Reply Quote 0
      • A
        ashokb last edited by

        oh .. I just found it . Yes there are functions isAbsolute() and isRelative() in QfileInfo class.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post