[PyQt] Shadow in Text

celsowm celsowm at gmail.com
Fri Nov 7 14:59:15 GMT 2008


i tried this, and works:

        wwrap = QtCore.Qt.TextWordWrap   
        print (wwrap)     
        paint = QtGui.QPainter()
        paint.begin(self)
        
        paint.setFont(QtGui.QFont('Decorative', 27))
        
        
        paint.setPen(QtGui.QColor(223, 135, 19, 255))
        #first is horizontal, second vertical
        paint.drawText(100,102,800,100,wwrap,self.text)
        paint.setPen(QtGui.QColor(100, 135, 19, 255))
        paint.drawText(98,100,800,100,wwrap,self.text)


But...	
I need a centralized text in window



Paul A. Giannaros wrote:
> 
> On Fri, Nov 7, 2008 at 1:34 PM, celsowm <celsowm at gmail.com> wrote:
>>
>> How is the best way to put shadow in text.
>> I tried this:
>> http://trolltech.com/developer/faqs/faq.2007-07-27.3052836051
>> I tried this ... but it was not good
> 
> What do you mean by "it was not good"? It did not look good? If so and
> you want a smoother looking shadow, you may want to try what the page
> suggested and draw the text in the shadow colour onto a QImage, blur
> the image, and then draw the text in your desired colour on top.
> 
>> --
>> View this message in context:
>> http://www.nabble.com/Shadow-in-Text-tp20380625p20380625.html
>> Sent from the PyQt mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> PyQt mailing list    PyQt at riverbankcomputing.com
>> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>>
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
> 
> 

-- 
View this message in context: http://www.nabble.com/Shadow-in-Text-tp20380625p20382191.html
Sent from the PyQt mailing list archive at Nabble.com.



More information about the PyQt mailing list