Python Forum
[PyQt] Qt Designer - Making a Font with a border
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PyQt] Qt Designer - Making a Font with a border
#2
This is what I use for blur effect on a pixmap. Perhaps you can apply it to a label with QGraphicsDropShadowEffect instead. I only tried with pixmaps, so you might be able to get it to work without the graphics scene and the painter, as shown here: https://wiki.qt.io/Text_Shadows_in_QLabel_Snippets

    def blur(self, pixmap):
        effect = QtWidgets.QGraphicsBlurEffect()
        scene = QtWidgets.QGraphicsScene()
        item = QtWidgets.QGraphicsPixmapItem(pixmap)
        scene.addItem(item)
        item.setGraphicsEffect(effect)
        image = pixmap.toImage()
        image.fill(QtCore.Qt.transparent)
        painter = QtGui.QPainter(image)
        scene.render(painter)
        painter.end()
        return QtGui.QPixmap(image)
Reply


Messages In This Thread
RE: Qt Designer - Making a Font with a border - by Alfalfa - Feb-18-2019, 03:08 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  QT Designer Krissstian 4 1,720 May-26-2022, 09:45 AM
Last Post: Krissstian
  Tkinter - How can I change the default Notebook border color? TurboC 5 14,816 May-23-2022, 03:44 PM
Last Post: bigmac
  Qt Designer : help document viewer error. davediamond 2 1,609 Apr-14-2022, 10:38 AM
Last Post: davediamond
  GUI programming PyQt 5 + Qt Designer flash77 9 2,749 Mar-19-2022, 10:31 AM
Last Post: flash77
  [PyQt] QT5 Designer Drawing greenhorn1 1 2,572 Dec-30-2021, 05:12 PM
Last Post: deanhystad
  Installed Designer - Helpf Files for "assistant" are missing Valmont 0 2,011 Mar-22-2021, 11:09 AM
Last Post: Valmont
  Using a GUI Designer vs. hard coding 357mag 9 6,106 Feb-21-2021, 06:43 PM
Last Post: kkaur
  Attempting to use Qt Designer. thewolf 17 6,161 Feb-17-2021, 12:03 AM
Last Post: thewolf
  [PyGUI] help code python QT Designer yan_mhb 0 1,932 Aug-12-2020, 09:32 AM
Last Post: yan_mhb
  [Kivy] Kivy Designer Module Error SARAVANAN_M 0 3,876 Nov-20-2019, 09:57 AM
Last Post: SARAVANAN_M

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020