Is there a way to place a button over a label in qtdesigner while using layouts? - pyqt5

This is how it is looking with the vertical layout
This is how I want it to look like with any possible layout using qtdesigner
The pencil is the QPushButton and the circle is the label

Related

Animate NSTextField Alignment

I'm trying to emulate the functionality of the Safari url text field (using NSTextField). I'd like the current text to be displayed centered, but when the user clicks on it the text should highlight and slide to the left. I've got the highlighting working but I'm not sure how to go about animating the text over to the left. Is it possible to animate the Alignment property or would I need to do some sort of custom drawing where I animate the position that the text is drawn?
Unfortunately this (Is there a way to animate changing a UILabel's textAlignment?) won't work, since a text field draws a background and border so animating the frame isn't an option.

How to change DateTimePicker border color in VB .NET

Is there any easy way to change the border of DateTimePicker Control ? I want it to have a LightGray border to match my application theme. I also tried DateTimeInput control of DotNetBar, it has an option to change border color, but the DropDownButton in it has LightBlue theme. I have also tried adding an image to that button but it doesn't covers up whole button, the blue sides of the buttons are still visible.

Custom Titlebar in a Cocoa Application

I need to create a (very) custom titlebar in a cocoa app. I read about the INAppStoreWindow library, but it seems it doesn't have the feature that I need. So here's what I have need to do (see image for clarification):
My titlebar is the thing between the green and red circle
The text (Text1 - Text3) are all images
The black circle with the exclamation mark is also an image
The grey area below the title bar is a webview. It expands from the left border all the way to the right edge of the reddish sidebar. (This is actually where why I think that the INAppStoreWindow won't work, as I cannot specify a width for the title bar)
The images should have an Action
Text1 through Text3 as well as the black circle load some URL into the webview
Red circle closes the app
My app has no borders and no shadows. Right know in order to be able to move the app I drew a Box element at the top where the title bar should be. I think I can draw something in it as well, but as I'm very knew to cocoa development here are my questions:
How can I draw some images in the Box element?
Is there a better element to draw the titlebar in?
I know that are two questions, but they are closely relatated. It's generally: How to draw a simple titlebar like this?
As the problem inside the titlebar is the same for every item I need to draw (they are all images) I belive there is a quite simple solution for that, but because I lack the experience of how to solve this I'd need your help. You can also point me the the right direction in the comments and I'll answer this question myself after I've got it right.

Resize buttons styled with AppBarButtonStyle

I like the AppBarButtonStyle idea of using font character as button icon because of its scaling abilities, but it is of no use if i cannot resize them properly.
Changing Width or Height of button does not work, because AppBarButtonStyle only resizes padding between button icon and button borders. Changing FontSize of button does not work either.
Is there any way of resizing buttons styled with AppBarButtonStyle in WinRT application? I dont mind if i have to override or modify AppBarButtonStyle, as long as it preserves the ability to use font character as button icon.
Any useful advices will be appreciated!
You can easily create your own custom button from AppBarButtonStyle from the original in the standardstyles.xaml .
I did so to create a custom smaller button with no text and the only hard part was aligning everything: you're not adding shapes, you're adding a character, so it may not be as aligned as you think. Default Buttons contain 3 charatctes: outline, fill and glyph.
If you want, I can share my simplified code for the control.

Video player controls (Play/Pause etc.) display as overlay

I am creating a custom video player in flash builder using SDK 4.1 on windows 7.
I have created video player controls like Play/Pause, progress bar etc. in a HBox.
Now I want to display these controls when user mouse hover on display object as overlay like in vimeo.com video player and remove/disable when hover out.
My current .mxml page structure is like http://i48.tinypic.com/15x4w7a.png
I simply show/hide video player controls HBox on video container mouse hover event by giving HBox height.
How can I implement overlay functionality in video player?
Any web link and source code would be highly appreciated.
The solution is to use a Flex container that will allow content to be layered on top of other content. By design, the VBox and HBox containers do not allow this. They layout their contents in a vertical or horizontal layout with no overlap.
You can use the Canvas or Group containers to overlay components on top of other components. Since you are using Flex 4, I would recommend using Group instead of Canvas ... and VGroup instead of VBox ... and HGroup instead of HBox.
Here is a simple layout you could do using the Flex 4 classes:
<s:Group>
<s:VideoDisplay top="0" bottom="0" left="0" right="0" />
<s:HGroup bottom="0" left="0" right="0"/>
</s:Group>
The VideoDisplay component is whatever you are using to show the video. Note that the top/bottom/left/right attributes tell the parent Group object to layout this component so that its top is 0 pixels from the parent's (Group's) top edge (and similar for the bottom/left/right edges).
The HGroup component is the container that holds your player controls. The HGroup is positioned to be 0 pixels from the bottom, left, and right edges of the parent container.
Instead of changing the height of the player controls container on mouseover, you should set the visible property HGroup (or HBox) container to false.
As they say, a picture is worth a thousand words. But on StackOverflow, code is worth a thousand pictures. If this answer doesn't help, you should edit your question and add the actual code you're using :)