Results 1 to 2 of 2

Thread: Attribute files

  1. #1
    Join Date
    Oct 2016
    Posts
    61
    Qt products
    Qt5
    Platforms
    Unix/X11

    Question Attribute files

    Hi i want to take attribute some my files:
    SetFileAttributes("C:/file.txt", FILE_ATTRIBUTE_NORMAL);

    But when i try show me these error:
    :74: error: 'FILE_ATTRIBUTE_HIDDEN' was not declared in this scope
    SetFileAttributes("C:/file.txt", FILE_ATTRIBUTE_HIDDEN);
    error: 'SetFileAttributes' was not declared in this scope
    SetFileAttributes("C:/file.txt", FILE_ATTRIBUTE_HIDDEN);

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Attribute files

    1. The compiler error message is self explanatory. You are missing an include.
    2. This is a Windows API C programming question and nothing to do with Qt. You should start with the relevant documentation
    3. According to your profile you do Qt work on Linux/UNIX, where Windows API is clearly not used.

Similar Threads

  1. How to set an attribute without affecting children?
    By dominate in forum Qt Programming
    Replies: 0
    Last Post: 15th February 2011, 14:58
  2. Replies: 1
    Last Post: 12th August 2009, 00:00
  3. QXmlStreamWriter and attribute namespaces
    By TomasC in forum Qt Programming
    Replies: 0
    Last Post: 11th December 2008, 06:11
  4. Removing locked attribute on Mac locked files?
    By gfunk in forum Qt Programming
    Replies: 1
    Last Post: 26th October 2007, 22:40
  5. Updating xml attribute
    By steg90 in forum Qt Programming
    Replies: 3
    Last Post: 17th July 2007, 09:26

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.