Hi all!
I photoshopped a custom user interface for a application i want to bring to life someday primarily for the windows platform. It has a custom titlebar with custom buttons and i designed tree-state windows actions buttons for closing, minimizing and maximazing.
First off: would you advice against using QML for this, or is that exactly what QML could be used for?
The problem I'm striving with is mouse-events. I must have done something wrong because when I implement my QML-file (witch work as expected in the qmlviewer) in the QDecalarativeView it doesn't handle mouse-events at all (no hover, click, or anything realy).
I also would preferably need the mouseevents that arent handled in my qml-file to propagate eighter to a subclassed QDeclarativeView (in c++) or all the way up to my QMainWindow::mousePressEvent(..). So that I can implement moving the window and resizing it.
Has anybody got any ideas for me? I'll be happy to look myself, I'm just kinda stuck right now. A point in the right direction would go a long way
Thanks!
EDIT:
Okay so I ended up sub-classing the QDeclarativeView and using its mouseEvent functions (also calling QDecalarativeView::mouseXEvent(event); every time to have the qml work aswell) to implement moving and resizing functionality.
Then I used a normal QWidget sub-classed class to set the titlebar together with the rest of the content and complete the custom window.
Thanks for the help viulskiez.
Bookmarks