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
Forum Updated to NodeBB v4.3 + New Features

Blurred background for Main window

Scheduled Pinned Locked Moved Unsolved General and Desktop
qtwidgetsqmainwindowqapplicationqtgui
3 Posts 2 Posters 1.4k 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.
  • S Offline
    S Offline
    shanmugaraja
    wrote on 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 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
      • mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on 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

        • Login

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