[Solved]How to diffetentiate relative and absolute path



  • 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()?



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


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.