I googled this question but didn't find any working solution.

Eventually I decided to ask it once again.

Can anybody provide me with a WORKING example of pro-file that copies qt dlls into output directory?

I tried this:
Qt Code:
  1. CONFIG += qt release
  2. SOURCES += src/main.cpp
  3.  
  4. message($(QTDIR)) # output: c:\Qt\4.8.4_vs2008\
  5.  
  6. # Method 1
  7. qt_libs.path=release
  8. qt_libs.files=$(QTDIR)bin/QtCore4.dll
  9. INSTALLS += qt_libs
  10.  
  11. # Method 2
  12. EXTRA_BINFILES += $(QTDIR)bin/QtCore4.dll
  13. EXTRA_OUT_FILES += release
  14. for(FILE,EXTRA_BINFILES){
  15. QMAKE_POST_LINK += $$quote(cp $${FILE} $$EXTRA_OUT_FILES $$escape_expand(\\n\\t))
  16. }
To copy to clipboard, switch view to plain text mode 

But it also doesn't work.
$(QTDIR) suddenly becomes empty. Although message($(QTDIR)) above produces a valid path to qt installations.