Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Save blured label as image

Save blured label as image

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 756 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Corsseir
    wrote on last edited by
    #1

    Hey guys, i try to put blur filter on image. To achieve this ive tried to code something like this:

    @label->setpixmap(myPixmap);
    blur->setBlurRadius(20);
    blur->setBlurHints(QGraphicsBlurEffect::QualityHint);
    label->setGraphicEffect(blur);
    QPixmap output = QPixmap(myPixmap.widht(), myPixmap.height());
    QPainter painter(&output);
    label->render(&painter);
    myPixmap.save("test.png");@

    I get just black picture. If I throw out line where i add graphic effect to label, I get original image (myPixmap).

    https://www.dropbox.com/s/nm5vplv5cn5owf2/1.png?dl=0
    https://www.dropbox.com/s/7fzjjergc1917ay/2.png?dl=0

    https://www.dropbox.com/s/j9ukc8pqpmfvsvl/3.png?dl=0
    https://www.dropbox.com/s/oguzir9vds57u4h/4.png?dl=0

    Help me please.

    1 Reply Last reply
    0
    • Chris KawaC Offline
      Chris KawaC Offline
      Chris Kawa
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi, welcome to devnet,

      This happens to me on Windows too. Please "report a bug":https://bugreports.qt.io?

      1 Reply Last reply
      0
      • C Offline
        C Offline
        Corsseir
        wrote on last edited by
        #3

        Ok, I will report this issue. Seems like i have to code blur filtr by myself :)

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved