Results 1 to 2 of 2

Thread: Tough windowing problem.... How to prevent state change of title bar?

  1. #1

    Default Tough windowing problem.... How to prevent state change of title bar?

    I am popping up a transparent webkit widget that expands across the whole screen (regardless of the size of the main app window) grabs the mouse focus and of course paints stuff on the screen where need be when the user clicks a button.

    The problem is that when the transparent window pops up the windows title bar changes styles. It is the style that a window gets when it is not active. So, my question is how do I stop the main application window's title bar from changing colors when the widget window pops up?


    This is how the widget is created:

    Qt Code:
    1. setWindowModality(Qt::ApplicationModal);
    2.  
    3. // make the background opaque
    4. QPalette qpalette = palette();
    5. qpalette.setBrush(QPalette::Base, Qt::transparent);
    6. page()->setPalette(qpalette);
    7. setAttribute(Qt::WA_OpaquePaintEvent, false);
    8. setAttribute(Qt::WA_TranslucentBackground, true);
    9.  
    10. setWindowFlags(Qt::FramelessWindowHint | Qt::SplashScreen);
    11.  
    12. page()->mainFrame()->setScrollBarPolicy(Qt::Horizontal, Qt::ScrollBarAlwaysOff);
    13. page()->mainFrame()->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAlwaysOff);
    To copy to clipboard, switch view to plain text mode 


    Maybe there is a better way to do this? I could not get it to work unless the widget was a window. What the widget accomplishes is a webkit replacement for QMenu.

  2. #2

    Default Re: Tough windowing problem.... How to prevent state change of title bar?

    Anyone have any ideas? I have spent hours on this problem with no success

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.