Hi Luigi, .....
Well, I have tested. My environment is
- WinXp
- Qt 5.6.0
- QtContribs 425 (I think there is no problem using 417)
-
I built Harbour and QtContribs using distribuited Qt C tool
(MinGw)
I have used this simple CLIPPER procedure code in my source
STATIC PROCEDURE udfCheck()
LOCAL oPrinterInfo
LOCAL oList
LOCAL nP
oPrinterInfo := QPrinterInfo()
oList := oPrinterInfo:availablePrinterNames()
hb_trace( HB_TR_ALWAYS, "size " + hb_NtoS( oList:size()
) )
FOR nP := 0 TO oList:size()-1
hb_trace( HB_TR_ALWAYS, "# " + hb_NtoS( nP ) + " name
>" + oList:at( nP ) )
NEXT nP
RETURN
n.b. as Qt write in documents:
it is NOT recommended to
use availablePrinters()
And it gives to me this output tracing (where oop1.prg is the source
program)
oop001.prg:66:UDFCHECK(): HB_TR_ALWAYS size 5
oop001.prg:70:UDFCHECK(): HB_TR_ALWAYS # 0 name
>Microsoft XPS Document Writer
oop001.prg:70:UDFCHECK(): HB_TR_ALWAYS # 1 name >HP
LaserJet 4050 Series PCL 6
oop001.prg:70:UDFCHECK(): HB_TR_ALWAYS # 2 name >doPDF 8
oop001.prg:70:UDFCHECK(): HB_TR_ALWAYS # 3 name >Canon
MP630 series Printer
oop001.prg:70:UDFCHECK(): HB_TR_ALWAYS # 4 name
>Automatico HP LaserJet 4050 Series PCL6 su SERVERTA
As you can see
5 is returned, but
you must start from 0
(zero) to :size()-1; remember difference between C and Harbour
I assume your program directory is <your_app_directory> (e.g.
can be harbour/bin but I think it's not good to be used); I have
used these .dll installed as belowe
<your_app_directory>\libEGL.dll
<your_app_directory>\libgcc_s_dw2-1.dll
<your_app_directory>\libGLESv2.dll
<your_app_directory>\libstdc++-6.dll
<your_app_directory>\libwinpthread-1.dll
<your_app_directory>\opengl32sw.dll
<your_app_directory>\Qt5Core.dll
<your_app_directory>\Qt5Gui.dll
<your_app_directory>\Qt5Network.dll
<your_app_directory>\Qt5PrintSupport.dll
<your_app_directory>\Qt5Svg.dll
<your_app_directory>\Qt5Widgets.dll
<your_app_directory>\plugins\iconengines\qsvgicon.dll
<your_app_directory>\plugins\imageformats\qdds.dll
<your_app_directory>\plugins\imageformats\qgif.dll
<your_app_directory>\plugins\imageformats\qicns.dll
<your_app_directory>\plugins\imageformats\qico.dll
<your_app_directory>\plugins\imageformats\qjpeg.dll
<your_app_directory>\plugins\imageformats\qsvg.dll
<your_app_directory>\plugins\imageformats\qtga.dll
<your_app_directory>\plugins\imageformats\qtiff.dll
<your_app_directory>\plugins\imageformats\qwbmp.dll
<your_app_directory>\plugins\imageformats\qwebp.dll
<your_app_directory>\plugins\platforms\qminimal.dll
<your_app_directory>\plugins\platforms\qoffscreen.dll
<your_app_directory>\plugins\platforms\qwindows.dll
<your_app_directory>\plugins\printsupport\windowsprintersupport.dll
<your_app_directory>\plugins\translations\qt_it.qm
I hope can you solve your problem.
Regards
Luigi