Results 1 to 3 of 3

Thread: Set hidden attribute to a folder in the Windows system file

  1. #1
    Join Date
    Nov 2006
    Posts
    9
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Question Set hidden attribute to a folder in the Windows system file

    I can't find a way to set the attribute "hidden" to a folder or to a file. I try to find out with QDir, QFile and QFileInfo. But no success.

    The only thing I find about the use of hidden file, is the use of filter for listing a folder with QDir.entrylist(..filters..).
    But there is no function like QDir.setAttribute(Qt::Hidden | Qt::ReadOnly) which would make a folder become hidden.

    Can someone help plz?
    Thx,
    Xelag

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

    Default Re: Set hidden attribute to a folder in the Windows system file

    I'm afraid Qt cannot help you with this. You might have to rely on platform dependent code, see SetFileAttributes().
    J-P Nurmi

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

    xelag (27th October 2007)

  4. #3
    Join Date
    Nov 2006
    Posts
    9
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Arrow Re: Set hidden attribute to a folder in the Windows system file

    Thank you for your answer. So, I will use Windows API.

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.