[solved]How can I cover part of a fullscreen widget and hide a widget ?



  • I worked on the unbuntu14.02, Qt5.5

    Here has two widgets, A and B.
    A is a fullScreen widget(now I used A.showFullScreen)
    B is another widget, I want it hide on then top of screen at first ,when the mouse move to the top of screen it will show up, and has some button to control A.

    I used QLocalServer and QLocalClient as communication tool.It work fine when A and B are both show up.

    here is my problem:

    1 when A is fullScreen , I move mouse to top of screen, and notify B to show up, but how can B cover A ?, I used show and set Qt::WindowStaysOnTopHint´╝îBut it didn't work.

    2 I set B move(x, 0 - size().y()) to hide B, but it did't work, it seems it's the problem if ubuntu top bar and left launch bar . I did not use hide() because i want to use a timer to show it slowly disappear and show up.

    Thanks for reading and please forgive my pool English, I hope the above text accurately expressed what I mean


  • Qt Champions 2016

    Hi

    Have you tried raise(); for B ?

    Also, for widget B. If you create it with parent as A, then move will clip B to A.
    So check you give it nothing in B's constructor to be allowed to move it offscreen.
    (it that is your issue)



  • @mrjj Thanks for reply, B.rise() is work.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.