I would like to try make a Dock app using QML (QtQuick) that emulates the animation of the MacOSX dock.
My intention is to make this a Desktop app, and use Mouse Area to detect mouse movements and create the "fish-eye" animation that the MacOSX dock is using.
I was thinking this would be possible using a QML ListView in horizontal mode (or vertical mode):
(see the expandingdelegates.qml:Qt Reference Docs)
Just wanted to get some feedback from experts, can this be accomplished reasonably well with QML? And where to start?
This can be done very easily using qml. You need to study about :
List View
Learn how to create and use
List Models
Learn how to use one and to edit(delete,append) entries in a given model.
Mouse area
Learn how to use and about 'onEntered' and 'onExited' signals.
Scale property
Behavior
Learn how it can be used to provide animations for change in an elements properties.
I think if you are clear with using all the above, you will be able to clearly visualize how to achieve what you are thinking of doing.
Related
I'm creating a simple (or so I thought) app that allows a user to drag/drop/reorder items within one of two recyclerview lists, or from one list to another. It should animate as you are dragging items, opening gaps that help you easily drop the item into the target spot. This functionality needs to go both ways between the lists. And for extra fun, drag should start on touch, not long press.
In case it makes any difference I'm trying to stick to MVVM, and my 2 recyclerviews are in 2 different fragments, but combined in one screen for this activity.
I'm a relative newbie to android, and using kotlin.
What I have managed so far
I can achieve a nice animation within one recyclerview, using ItemTouchHelper.
OR
I can achieve drag and drop from one recyclerview to the other, and I can start that on touch rather than long press, using View.OnDragListener.
What I can't seem to do is get both of those working at once--drag to another view, but with those beautiful animations ItemTouchHelper provides as the drag is underway.
I have tested all kinds of combinations of attaching customized drag or touchlisteners to my viewholders or recyclerviews. The closest I've gotten to getting things working is attaching the draglistener to the recyclerviews only, in order to receive the dropped view. Then I have set draglisteners and touchhelpers on the viewholders (via the recyclerview adapter).
With this setup I can drag between or within recyclerviews on touch, and have managed to get an animation AFTER drop by calling onItemMove of my adapter (provided as a parameter in my custom draglistener) from within the ACTION_DROP of my dragListener.
I've been working on this for a VERY LONG TIME and googled the heck out of it without luck. Help deeply appreciated.
I'm having all kinds of trouble understanding how NSWindows can have larger documents than the window bounds in them.
Unfortunately, layout and contents prevents me from simply shrinking the document (and I wouldn't want to make the layout cramped for those with larger screens).
A school needs to run this app on their new 13", non-retina MacBook Pros. Scrolling is acceptable to them, but I'm unsure as to the approach, and I'd like your advice on the best way to handle this to avoid forced scrolling on larger screens.
I've tried setting the NSWindow min and max size and embedding the document in a Scroll View. But even though you can see part of the document view sticking out, no scroll bars appear (I have set them to Always in sys prefs).
If this is the way to go I would appreciate a link to a tutorial on this exact subject, because I'm a bit lost with all the measurements and options.
If not I'd like a pointer where to start and what to read. I'm experienced with Cocoa Touch but a relative newcomer to Mac development.
Without more information it sounds like you have embedded a NSScrollView but didn't set up the springs and struts properly to allow the scroll view to resize when its parent view (assuming it's the window) resizes.
You might want to check out Specifying a View’s Behavior as Its Container Resizes in the Interface Builder Help documentation.
I'm currently using the storyboard feature to position views. Due to the nature of these views, they need to be positioned with precision.
I'd like to view the Storyboard Scene/View in a magnification/zoom level greater than 100%, but it doesn't seem to be possible using the standard zoom in/out feature.
Is it possible to do this?
Note - I understand how to use the 'Size Inspector'.
It doesn't look like there is a way to do this, but there is at least one alternative that works fairly well:
Go to System Preferences > Accessibility > Zoom
Turn on the keyboard shortcut or scroll gesture
You should now be able to zoom in on any part of the operating system, including storyboards.
To make editing even easier, enable these options, some of which are found under More Options...:
Turn off Smooth images
Change Zoom Style to Picture-in-picture
Window Position: Follow mouse cursor
Cursor style: Crosshair
Enable temporary zoom
No, I am almost positive it is not possible to do this. You are stuck with 100% zoom. However, if you need great precision, you could try selecting the element you wish to move and use the arrow-keys to move the item around accurately.
However, like MacN00b, I do not use Storyboards a lot, so perhaps there is some top-super-secret setting buried somewhere.
This is one of the reasons I don't use storyboard but prefer good old fashion individual xibs. I don't think it is possible to zoom in past 100%, you may try double clicking on the background, I know that normally zooms in.
XCode 4 (but also iTunes and other Mac apps) provide side or bottom bars that can be shown or hidden with a smooth animation as the user presses a button.
How can I obtain a similar effect in my applications?
You can use NSSplitView to do that. You can have more than 2 subviews in a split view (left|center|right) and you can build a kind of hierarchy for the different bars (center consists of top and lower split views).
The show/hide effect is not built in, though. But you should be able to use the animator to do that. Most certainly you can also define animations for hiding a view.
You could also use the BWSplitView of http://brandonwalkin.com/bwtoolkit/ where the show/hide animation is already included.
You could also consider subclassing NSViewAnimation, which I believe Xcode uses in a number of places to achieve its fancy animation effects.
I am tryimng to make a UI. But in qt, the window size is too short, I want to work in a separate windows like photoshop. Here I am posting the picture. I want to see the middle window(i rounded it by rose color) in full screen size. Can anybody help me?
EDIT:
If I want to create a full screen application, How can I position the widgets in it. It's possible dragging a widget inside a scroll bared window,but is not user friendly. I want it to work like photoshop, like separate windows.
If you want to have more space to work on the design of your widgets, you can open QtDesigner separately and maximize the design area. Panels can be closed and undocked.
Now if you want to maximized only the central widget, there is a trick:
Create a custom widget and work on it in QtDesigner. You will be able to put it in near full screen by increasing its size
Set your custom widget as central widget in your GUI application.
Previous answer before edit:
Hi, If you want to view your widget in fullsreen mode, you can call the ShowFullScreen function. If what you want is to maximize the widget, you can call the ShowMaximized function.