How to tell Dolphin which files to hide?

Recent versions of Dolphin support .hidden files. The .hidden file needs to be created in the same directory as the files to be hidden. Each line in the .hidden file lists one filename in the directory to be hidden. Patterns/file globs such as *~, *.synctex.gz or *.log are not supported unfortunately.

Let's say you would have a directory with the following content:
a.log
b.txt
b.txt~
c.txt
c.txt.gz

and you wanted to hide the files a.log, b.txt~ and c.txt.gz. You would create a file .hidden in the same directory with the following content:
a.log
b.txt~
c.txt.gz

Dolphin would now display only:
b.txt
c.txt