[Interest] qws and dialogs

Josiah Bryan josiahbryan at gmail.com
Mon Jul 30 17:14:40 CEST 2012


On Mon, Jul 30, 2012 at 4:15 AM, pritam.ghanghas at gmail.com <
pritam.ghanghas at gmail.com> wrote:

> Hi Atlant,
>
> I tried that method some time back. The problem is my dfb setup doesnt
> blend windows when there is an alpha involved.
> The Dialog becomes opaque even when I paint it with alpha. I have tried
> various options like
>
> <snip>
>
>
But it seems my dfb driver itself doesnt support any translucency in
> windows.
>

Just a thought - I've never done this, but this could work as a hackish way
of simulating transparency for your purposes.

Take a "snapshot" of the screen:

QDesktopWidget <http://doc.qt.nokia.com/latest/qdesktopwidget.html>
*desk = qApp->desktop();
QPixmap <http://doc.qt.nokia.com/latest/qpixmap.html> desktopscreen =
QPixmap <http://doc.qt.nokia.com/latest/qpixmap.html>::grabWindow(desk->screen()->winId());


Then make a widget full screen, paint the snapshot you just took in a
QImage/QPixmap, then paint a black rect with, say, 50% opacity, over that,
then fill the background of your fullscreen widget with your newly darkened
QImage.

Then make just throw your dialog over *that* - I realize that's a hack, but
it seems like fakes and hacks are all you have left if you really want this
effect...just my thoughts, feel free to ignore!

-Josiah

-- 
Josiah Bryan
765-215-0511
josiahbryan at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20120730/1c32dff9/attachment.html>


More information about the Interest mailing list