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. QGraphicsDropShadowEffect can not show shadow without gnome desktop
Forum Updated to NodeBB v4.3 + New Features

QGraphicsDropShadowEffect can not show shadow without gnome desktop

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 300 Views 1 Watching
  • 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.
  • MozzieM Offline
    MozzieM Offline
    Mozzie
    wrote on last edited by
    #1

    Hi,
    recently, I found some window use QGraphicsDropShadowEffect to show shadow around the window have different behavior while use lightdm or gdm to start the application.

    Part of my code:

    _layout->setMargin(24);
    QFrame* centralWidget = new QFrame(this);
    _layout->addWidget(centralWidget);
    
    auto* shadow = new QGraphicsDropShadowEffect(this);
    shadow->setOffset(0, 0);
    shadow->setColor(QColor(0x444444));
    shadow->setBlurRadius(30);
    centralWidget->setGraphicsEffect(shadow);
    

    when I start the application after login to gnome desktop, It shows correctly. but when I add my application at /usr/share/xsession directory and then login to the application, the shadow became all black.

    right:
    3.PNG
    incorrect:
    微信图片_20210616094215.jpg

    I am using
    Qt 5.12.10
    Ubuntu 18.04 aarch64
    jetson tx2

    or Does anybody know how to start qt application once the linux system started and no need to show the desktop.

    thank you very much.

    1 Reply Last reply
    0
    • Kent-DorfmanK Offline
      Kent-DorfmanK Offline
      Kent-Dorfman
      wrote on last edited by
      #2

      window decorations are largely under the control of the window manager. Think of the stuff you specify as "hints" not directions.

      1 Reply Last reply
      2

      • Login

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