QT3 cygwin/X11

This frequently answered questions are collected from the kde-cygwin mailing list and the kde-cygwin related sourceforge foren. If you don't find an answer for your problem here, please take a look directly into the mailing list and/or the foren.

Index


Where can I get the qt documentation ?

Documentation is located in the binary release and also online. See doc.trolltech.com

qt3 from cvs failes to compile ?

If you check out qt from CVS you have to first issue an 'make -f Makefile.cvs'. This generates the missing symbolic links to the header files.

The next step is to configure with the correct options. You can use the script config.cygwin-thread. This seems to be needed for KDE 3.x.

The next problem I had was linking. If it's missing the Library libdl.a, you can create a symbolic link to /lib/libcygwin.a in /lib or /usr/lib. This fakes the ld library. Alternatively you can also remove the -ldl option from mkspecs/cygwin-g++/qmake.conf.

(Note: Current cvs releases already contains the last mentioned fix)

For additional informations about compiling see the compiling page.

How do I configure printing with qt ?

Printing support for qt requires an installed cygwin ghostscript and cygutils package.

QT by default uses the lp command for printing, so the current qt printing support provides this command by using the ghostscript interpreter.

QT/cygwin releases newer than 3.2.3-3 already have installed the printer support, but for older releases, see the following steps:

  • Copy and paste the following command into a bash shell, than press RETURN and CTRL-D to close the cat command:
     
    $ cat >/opt/qt/3.2/bin/lp
    #!/bin/sh
    PRINTER="\\\\ntserver02\\BrotherH"
    #PRINTER="lpt1:"
    PRINTER_TYPE=deskjet
    PAPER_SIZE=a4
    
    LOG_FILE=/var/log/$0.log
    INFILE=/tmp/$0.1$$
    TMPFILE=/tmp/$0.2$$
    
    # save data into temporary file 
    cat >>$INFILE
    
    # convert postscrupt data into target format 
    GS_PARAMS="-q -sPAPERSIZE=$PAPER_SIZE -sDEVICE=$PRINTER_TYPE -sOutputFile=$TMPFILE -dNOPAUSE -dBATCH $1"
    echo "gs $GS_PARAMS" >>$LOG_FILE
    gs $GS_PARAMS >>$LOG_FILE 2>&1
    RESULT=$? 
    rm $INFILE
    
    # in case of errors
    if test "$RESULT" != "0"; then
      exit $?
    fi
    
    if test -f $TMPFILE; then
            echo "/usr/bin/lpr -l -d $PRINTER $TMPFILE" >>$LOG_FILE
            /usr/bin/lpr -l -d $PRINTER $TMPFILE >>$LOG_FILE 2>&1
            echo "rm $TMPFILE" >>$LOG_FILE
            rm $TMPFILE >>$LOG_FILE 2>&1
    fi
    exit $?
    
  • change the variables PRINTER AND PRINTER_TYPE in the lp script as you need. You may consult the ghostscript documentations for supported printer types.
 
Prev:CompilingNext:Overview

GOWEBCounter by INLINE visitors Hosted by SourceForge