Is there anyway you can give me a code example,please?
Is there anyway you can give me a code example,please?
Something like;
QMainWindow::menuBar()->hide();
You can do it from the designer as well.
What I really need is to show the ToolBar when the mouse cursor moves to some specific area.Would you give me some suggestions?
Oh I see...To do so you need to handle mouse events in the regarding ui's controller class. You can do it in various ways.
1. You can reimplement QWdiget::mouseMoveEvent(QmouseEvent* e).
2. You can use eventFilter() method along with installEventfilter()
You can get the current mouse position from both ways above and compare the position if it's on your widget. Then you can show/hide the toolbar.
drunknight (3rd December 2013)
Thank you.I will try it in both way: )
1) enable mouse tracking, see QWidget::setMouseTracking()
2) overwrite mouseMoveEvent()
3) check QMouseEvent:os()
Cheers,
_
Bookmarks