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. Blurred background for Main window
QtWS25 Last Chance

Blurred background for Main window

Scheduled Pinned Locked Moved Unsolved General and Desktop
qtwidgetsqmainwindowqapplicationqtgui
3 Posts 2 Posters 1.3k 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.
  • S Offline
    S Offline
    shanmugaraja
    wrote on 9 Jan 2020, 16:48 last edited by
    #1

    Using QMainWindow, I want to make the main window (root window) to have blurred transparency as like the screenshot I have attached here.

    I am able to do this blurred background (Screen behind the window is blurred) using the pure native implementation for Mac using NSVisualEffectView available on Mac in Objective-C.

    But i want to implement the same effect using Qt.

    MainWindow.mm

    - (void)awakeFromNib
    {
        [super awakeFromNib];
        [self applyBlurVisualEffect];
    }
    
    - (void)applyBlurVisualEffect
    {
        NSVisualEffectView *view = [[NSVisualEffectView alloc] initWithFrame:self.contentView.bounds];
        view.blendingMode = NSVisualEffectBlendingModeBehindWindow;
        view.material = NSVisualEffectMaterialDark;
        view.state = NSVisualEffectStateActive;
        [self setContentView:view];
    
    }
    

    Is there any Qt Widget attribute or Application Attribute or any other Qt API available for achieving this effect?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      shanmugaraja
      wrote on 9 Jan 2020, 16:58 last edited by
      #2

      I am attaching the screenshot here and highlighted the window displayed on the bottom center of the screen.
      Screenshot of Window having blurred background

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mrjj
        Lifetime Qt Champion
        wrote on 9 Jan 2020, 17:08 last edited by
        #3

        Hi
        As far as I know, there is nothing like that in Qt. It can blur widgets but not the actual desktop.

        1 Reply Last reply
        0

        1/3

        9 Jan 2020, 16:48

        • Login

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