How can clipping be prevented on a Qt QLabel? - qt-designer

I have a dialog created in Qt Designer with contents that resize when the window is resized.
When the window height is made too small, the text in the window clips as follows:
How do I prevent the labels from being clipped?
Most specifically, the window must not resize any smaller than the size of the word wrapped text without clipping.

Related

Canvas background color not saved

Tkinter canvas.postscript is not saving the canvas background.
Sizes of the canvas that are used throughout the Python code:
w = 800
h = 600
Function to be assigned to "SAVE CANVAS' button:
def save_canvas():
canvas.update()
canvas.postscript(file= r'Z:\\...\FILE.ps', height=h, width=w, colormode='color')
When I click on the button that has the save_canvas command assign, the file that is saved has no background as assigned in the widget. I changed the color to orange, green, etc. draw on it. Everything looks ok, but saving is without background. Same with .jpeg/.png
What do I need to call for saving the background? I'll be needing this as the application I build require images as background as well.
I don't believe the postscript command is designed to preserve the background color of the canvas widget. It only saves the items that appear on the canvas.
A simple solution is to draw a rectangle that is the exact size of the canvas, and change the color of that rectangle.

Changing text canvas size

I realize I may not have my terminology down yet, I'm new to after effects, so I've attached a picture of what I am trying to achieve. I'd like to know how to resize the black canvas surrounding the "of magic" text layer can add more text.
Go to Composition > Composition Settings and change the size (in pixels) of that canvas under width and height.
Alternatively if this is a text block within an already larger canvas, click onto your text in the composition with the Type Tool cmd+t/ctrl+t and expand using the corner points to expand the visible type.

PyQt - Keeping spacing at zero during window resize, grid layout

I'm making an emacs-esque toy text editor. At startup, there's one large window (a QTextEdit derivative) in the top center of the screen, with a minibuffer (QLineEdit derivative) underneath. Both of the actual editing widgets are contained in the grids of parent classes called Window and MiniWindow (Window also keeps track of a QLabel that appears directly beneath the QTextEdit).
My Window object is at location 1, 1 in the grid, and my MiniWindow object is at 2, 1. I've set content margins to 0 and spacing to 0, which looks great at first, but when I try to grow the window by dragging on the corner, this starts to happen:
As you can see, the screen is divided into two rows (as it should be), but half of the vertical length of the screen is dedicated to each row. What I need is for the top Window to stretch its length during resizing so that it is always adjacent to the MiniWindow underneath. Is there some other option I need to be setting?
Nevermind, got it.
I was having this problem because the QLineEdit object was in the grid of my container class, MiniWindow. The height of a MiniWindow object is free to vary with the window resizing in a way that a QLineEdit alone would not be. The fix was set to the maximumHeight of MiniWindow to approximately the height of a QLineEdit, which is around 16.
Works great now.

Gnome / GTK: Increase floating dock-widget "resize border" width?

I am developing an app using Qt 5.5
I have a main window with a dock, and a dockable window which can be dragged out/popped out, floating in its own separate window. (QDockWidget)
The resize border width of the main window is perfectly adequate, so resizing the main window using the mouse is very easy.
Resize margin width of main window (ie: when docked):
The space within the red border here represents the area where the mouse cursor changes to a resize cursor.
Resize margin width of undocked window (ie: when hovering):
When I pop out my docked window (QDockWidget), so that it's now floating, the resize border width drops down to a single pixel
As such, it is almost impossible to resize a floating dock window.
I am running Ubuntu Gnome 14.04, so using Gnome 3 with (I think?) Adwaita theme.
I have tested this on default Ubuntu 14.04, so using Unity, and this is not an issue there (the resize border width is several pixels, so much easier to "find" with the mouse)
Question:
How can I configure Gnome 3 / Adwaita to increase this border width?

How to ensure graphics size change with change in window size?

I am drawing a rectangle in a picturebox. when the user manually changes the window size the rectangle size does not change. how do i make it resize?. i am drawing in the Paint event Thanks a lot

Resources