[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: QPrinter Question
From:       Jason Terando <jason.terando () verizon ! net>
Date:       2003-12-02 15:10:41
[Download RAW message or body]

Thanks for you assistance

I did an ldd on libqt-mt.so.3 and didn't see libcups.so anywhere.  I'll 
poke around in Konstruct and make sure CUPS is enabled.  That sound 
better than trying to cludge KPrinter into a QT app.

I'll do a post on how it turns out...

Goffioul Michael wrote:

>I'm summarizing my answers to the thread in this mail.
>
>1) about the backtrace below: using KPrinter in a plain QT
>   app does not work, you'll need at least a KInstance or a
>   KApplication object. If you're developing a cross-platform
>   app, I guess you're still using a QApplication object?
>
>2) about QPrinter not finding the printers: Qt has support
>   for CUPS, but it needs to be built in the library. Otherwise,
>   it's possible that simply Qt cannot get the printer list
>   from CUPS. Possible solutions:
>	- check if Qt is linked to libcups (use "ldd")
>	- configure CUPS to create a printcap file, such that
>        Qt can still access printer list using the old LPR-way
>        (done in /etc/cups/cupsd.conf, see CUPS doc)
>
>Michael.
>
>  
>
>>-----Original Message-----
>>From: Jason Terando [mailto:jason.terando@verizon.net]
>>Sent: Tuesday, December 02, 2003 05:21
>>To: kde-devel@kde.org
>>Subject: Re: QPrinter Question
>>
>>
>>Hi,
>>
>>Thanks for the reply, I got it to link.  My program runs, but when I 
>>call my function which puts a KPrinter on the stack, I get the 
>>following, and I'm wondering if I need to do something else to use 
>>KPrinter in a QT app.
>>
>>TIA
>>
>>Program received signal SIGSEGV, Segmentation fault.
>>0x410a1a9d in KInstance::iconLoader() const () from 
>>/opt/kde3.1.4/lib/libkdecore.so.4
>>(gdb) info thread
>>* 1 Thread 16384 (LWP 29322)  0x410a1a9d in KInstance::iconLoader() 
>>const () from /opt/kde3.1.4/lib/libkdecore.so.4
>>(gdb) backtrace
>>#0  0x410a1a9d in KInstance::iconLoader() const () from 
>>/opt/kde3.1.4/lib/libkdecore.so.4
>>#1  0x4109a944 in KGlobal::iconLoader() () from 
>>/opt/kde3.1.4/lib/libkdecore.so.4
>>#2  0x40051297 in KMFactory::KMFactory() () from 
>>/opt/kde3.1.4/lib/libkdeprint.so.4
>>#3  0x40050d2d in KMFactory::self() () from 
>>/opt/kde3.1.4/lib/libkdeprint.so.4
>>#4  0x400911b1 in KPReloadObject::KPReloadObject(bool) () from 
>>/opt/kde3.1.4/lib/libkdeprint.so.4
>>#5  0x400712e4 in KPrinter::KPrinter(bool, QPrinter::PrinterMode) () 
>>from /opt/kde3.1.4/lib/libkdeprint.so.4
>>#6  0x08053601 in AddMachine::print() ()
>>#7  0x0805d209 in AddMachine::qt_invoke(int, QUObject*) ()
>>#8  0x40315a79 in QObject::activate_signal(QConnectionList*, 
>>QUObject*) 
>>() from /opt/kde3.1.4/lib/libqt-mt.so.3
>>#9  0x405f3d52 in QSignal::signal(QVariant const&) () from 
>>/opt/kde3.1.4/lib/libqt-mt.so.3
>>#10 0x4032fcf8 in QSignal::activate() () from 
>>/opt/kde3.1.4/lib/libqt-mt.so.3
>>#11 0x40404525 in QPopupMenu::keyPressEvent(QKeyEvent*) () from 
>>/opt/kde3.1.4/lib/libqt-mt.so.3
>>#12
>> 0x40349c9c in QWidget::event(QEvent*) () from 
>>/opt/kde3.1.4/lib/libqt-mt.so.3
>>#13 0x402b7bc4 in QApplication::internalNotify(QObject*, QEvent*) () 
>>from /opt/kde3.1.4/lib/libqt-mt.so.3
>>#14 0x402b7757 in QApplication::notify(QObject*, QEvent*) () from 
>>/opt/kde3.1.4/lib/libqt-mt.so.3
>>#15 0x4025f41c in QETWidget::translateKeyEvent(_XEvent 
>>const*, bool) () 
>>from /opt/kde3.1.4/lib/libqt-mt.so.3
>>#16 0x4025b412 in QApplication::x11ProcessEvent(_XEvent*) () from 
>>/opt/kde3.1.4/lib/libqt-mt.so.3
>>#17 0x402705e1 in QEventLoop::processEvents(unsigned) () from 
>>/opt/kde3.1.4/lib/libqt-mt.so.3
>>#18 0x402cba26 in QEventLoop::enterLoop() () from 
>>/opt/kde3.1.4/lib/libqt-mt.so.3
>>#19 0x402cb8c8 in QEventLoop::exec() () from 
>>/opt/kde3.1.4/lib/libqt-mt.so.3
>>#20 0x402b7df1 in QApplication::exec() () from 
>>/opt/kde3.1.4/lib/libqt-mt.so.3
>>#21 0x080549c4 in main ()
>>#22 0x4095f7f7 in __libc_start_main () from /lib/i686/libc.so.6
>>
>>
>>    
>>
> 
>  
>
>>>Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
>>>
>
>
>  
>


 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic