How to change the file attributes using Qt ?
How to change the file attributes using Qt ?
What attributes? QFile::setPermissions() can manipulate some permissions depending on OS.
Read-only is probably handled by QFile. The others you are talking about are non-portable Windows-only things and you need to use the Windows API.
https://msdn.microsoft.com/en-us/lib...8VS.85%29.aspx
They get whatever value you give them
DWORD = 32-bit integer. The parameter value is made as a bitwise OR of the desired attribute values from API docs.
LPCTSTR = Long Pointer to a Const TCHAR STRing. The value is the file name as, in this case, a const wchar_t*. You can get one of these from a QString using the utf16() or toWCharArray() functions.
You would have to ask the original Windows programmers. I suspect it is combination of personal preference/common practice and because typedef did not become standard until until the 1989 ANSI standard (and not reliably available until after that). The first Windows versions would have been constrained to K&R C.
HWND is a handle to a window (it is just a number with no encoded meaning). Look in your Windows header files to find what the macro expands to. A Qt widget can provide an equivalent HWND where one exists: see QWidget::winId()
Bookmarks