I found that video on Youtube. It shows how to flip something called QML Flipable. I'm completely unfamiliar with QML so I have the following questions:
1) Is it possible to flip an ordinary QLabel like this? If yes how do I do that?
2) If it's not possible then how do I add that Flipable entity to my QMainWindow?
Thanks, everyone
You could use the QGraphicsPixmap with your image , set the rotation center with setTransformOriginPoint and animate the transformation matrix with QProertyAnimation
There's no convenient way to do this. Desktop OS's don't provide this functionality.
One option is to use QGraphicsView. You can add widgets to a QGraphicsScene using QGraphicsScene::addWidget(), for example, and then transform the view the way you want.
Quick google search points me to a blog article where author of the video (Kunal Parmar) describing how this particular effect was done.
Related
I need to create a graph in my dialog box which displays as I've shown in the image. I need some guidance to move forward with this. Example graph is shown here
So I am developing an application in Qt creator, and I need to display a graph in a dialog box that would give better understanding of different stores and comparisons among them.
Firstly I need some guidance to know what type of Qt widget should be used and then how to create those blocks as a graph.
I am not that familiar with qt grasp, can someone help me out with this?
Qt's designated widget to render images is indeed QLabel. Just render your graph, load it up on a QPixmap by calling for example QPixmap::fromImage, and then update your QLabel by calling QLabel::setPixmap.
Let's take the horizontal sprite of images of my previous question:
So, I have 4 images in 1. Let's say that I want to use only the green circle for styling a QComboBox arrow. I know I can style it with a single image with
QComboBox::down-arrow {
image: url(:/downarrow.png);
}
but is it possible (in the stylesheet or by another means) to get only a piece of the image used?
Unfortunately that is not possibile with Qt Style Sheets, since they do not support absolute values for background-position, as stated in the documentation
The answer to the linked question is still the best way to implement this with Qt.
I would like to create a city of top view. For example, something similiar as these images:
http://image.shutterstock.com/display_pic_with_logo/73497/73497,1329086967,2/stock-photo-city-top-view-95061103.jpg
http://www.bigcitypix.com/image/big-city-pictures-logo-gearhead-city-buildings-cross-streets-aerial-rooftops-roof-top-high-angle-overhead-view-film-video-shoot-graphic-media-company-brand-image-700x460.gif
I work in adobe Illustrator. Please, how can I do a building of top view? Can I make a building in the perspective view and then rotate to the top view? Or how? Please, if you know about a good tutorial where it is describes, could you send me the link? Thanks.
For the first image, I would go to 3d programs like 3ds Max / sketchup for that effect.
For the second image,
You could use:
- draw some squares
- go to "effect" at the top menu, "3D" - "extrude and bevel"
Hope that helps
Please check that only first image opens.
Its way too easy to do like this. Just hit "M" in illustrator and start making squares and rectangles.
Cheers!
i need to create GTK GUI with image and transparent label (darker) that is placed over the image. The first problem is overlapping. I tried Gtk::Table and Gtk::Fixed container but it behaves strangely. The second problem is transparency. I would like to use CSS styles or transparent background image. Is there anybody who can help me posting some sources or examples? Thanks
You could subclass GtkWidget, or GtkDrawingArea since I think it will be faster than the altenatives. But you could use GtkOverlay, plus GtkImage and GtkLabel to acomplish what you're looking for.
gtk3-demo app that comes with Gtk+-3.0 give some examples of how to use GtkOverlay.
Maybe you could give a look to clutter-gtk ? You can do nice things with it.
I've been using label to display images. I'd like to be able to click and create a bounding box then be able to drag the cursor to move around in the image. What would I need to do this? Thanks.
I'm not 100% sure I understand what you are trying to do, but I think the QGraphicsScene is what you are looking for. You can (among many other things):
Render images (QGraphicsPixmapItem, for example)
Change the zoom level when rendering the scene on a QGraphicsView.
Select things using a "rubber band"
Move items around with the mouse (see QGraphicsItem::ItemIsMovable)
etc.
You may need to get familiar with Qt's graphics view framework.