I try to implement custom editing into my UIImagePickerController. I wrote a drawing view subclass of UIView.
And now I want to add one of my UIDrawView as the editing view for the UIImagePickerController. Is there a way to implement something like this?
I heard that the UIImagePickerController is a UINavigationController. So could I make a subclass of UIImagePickerController and push an UIDrawView object into the imagePicker when the user took a photo?
If possible, which class methods should I inherit from UIImagePickerController?
Thanks for any help! With kind regards – Julian
Related
There are three delegate method with UIImagePickerDelegate.
(void)imagePickerController:(UIImagePickerController *)picker
didFinishPickingMediaWithInfo:(NSDictionary *)info;
This method tell you the piture you take.
But when I tap the "taking photo button", how I know the event?
You should
1) subclass UIImagePickerController
2) set showCameraControls = NO
3) create your own controls on this ViewController's view
Xcode 7.3, iOS 9.3
My way is a bit hacky, but essentially I drill down the view hierarchy to find CMKShutterButton, then attach a method to the the appropriate control event.
See my post and solution here: iOS, UIImagePickerController, is there a way to detect when user taps the take picture button without implementing custom controls? and https://stackoverflow.com/a/36489246/4018041.
Hope this helps! Cheers.
I am trying to develop a functionality using Qt which I don't know whether it is possible to implement. Here is the requirement:
When the user hovers over a node (an object derived from QGraphicsItem), a window will be shown near the node, in the window there might be some histograms or buttons that can be clicked to show further information. When the mouse leaves the window, it will automatically close.
I tried to use a tooltip, because it can pop-up near the node and close when the mouse leaves it, but it can only show text. So, it still cannot work that way. I am wondering if there is another way to do this? I did lots of google search, but there is still no answer.
Thanks so much for helping me with this.
If you're ok with using a 3rd party library, Qxt provides a class that provides a tooltip that is QWidget based, which will let you use an arbitrary widget as the tooltip rather than just text.
See: Qxt::ToolTip
you don't have to use tooltip for your app
you can use or call widget or dialog, on hover mouse event
Please refer Qt Example EmbeddedDialog Example, It is advanced, But you can understand how hover Enter/Leaving events are working. I personally prefer don not create instance of Popupdialog for each item, create it if only nesessary. Otherwise create one dialog and pass its reference to all the items through the constructor initialization.
1. These are the API you are intrested on, reimplemet this.
QGraphicsItem::hoverEnterEvent(QGraphicsSceneHoverEvent *event) and void QGraphicsItem::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
2. When You create Dialog, You can pass Qt::WindowFlags as Qt::ToolTip.
I have just completed my first Qt 5 project and I want to add an About dialog. Is there a default, and how do you use it? If not, what's the best way to add one and edit it and display its content using the Help menu action? Any help would be appreciated. Thanks in advance.
The way to add a dialog to your project depends a little bit on what development environment you are using. You can always use QtDesigner (part of Qt) to design your About dialog and then add it to your project. To display it, just call the exec() function of the QDialog class in a slot connected to the triggered() signal of your About QAction object.
I need to create a view like this in Qt
If I click the circle then it'll give a popup message like this "You clicked 2 circle."
I need to add the circle during run time in any location. How to implement this in Qt using QGraphicsView? Or are there any other better way to implement this?
The following page from Qt documentation can help you: http://doc.qt.io/qt-5/graphicsview.html
The Drag and drop example will help you to know how deals with your QGraphicItems
Hope that helps
I am working on a navigation based application. I am using navigation controller for this purpose. I want to use tab bar on one of the screens and i am not able to find any way of doing this. As far as i have read, it is not possible to add tab bar controller when you are using navigation controller. Is it right? One solution was to manually add a tab bar on the screen and write its delegate class but in this solution, I will lose "More" button functionality because this thing is handled by tab bar controller itself. Does anyone has any solution to my problem? Please help!!!
You can add a UINavigationController to each of the UITabBarController's tab views but not the other way around.
According to Apple's documentation you cannot push a UITabBarController on top of the UINavigationController. I'm not sure if that is a technical limitation or if they will reject your application when you submit. Either way you shouldn't try to do this.