Frameless window but with buttons keeper - qt

I want to achieve like this below:
However, when I use setWindowFlags(Qt::Window | Qt::FramelessWindowHint);, It looks like this:
How to hava a button like this? And also a round corner instead of a straight corner.

Use Qt-Nice-Frameless-Window can solve this in macOS.

Related

Can i make tree graph where button means leaf?

id like to do something like tree graph with buttons. Idk how to explain my idea so ive created image. I build my website via Elementor. Is it even possible please?
My image
You can do this in one section using buttons and dividers, set width for the divider, and set it using margin and padding

How to make columns in Slickgrid cover entire grid/row width?

Im trying to get slickgrid to autoadjust the columnsizes to fit the width of the grid but it do not seem to work. There is a grayish area to the right.
This is how it looks:
When i manualy click "Adjust column-sizes" in the menu the result looks like this:
That how I want it by default and not by having to click the menu-option.
Anyone who have had the same problem and know what the fix is?
Thanks in advance
You have to put the sum of column percentages to be equal to 100 to get them to display so

Sikuli gets confused between 2 identical buttons

I have identical buttons on the same page and I want Sikuli to click only one of those but it ends up clicking the other name sake button. Unfortunately, the button names cannot be changed. Any suggestions on how I could handle this situation?
Thanks!
You can tell Sikuli to operate on a particular region on the screen relative to a given image/screenshot object. This is called TargetOffset. Refer here assuming you are asking about using sikuli programmatically. From Sikuli IDE, double click on the screenshot image and it brings up a window where you can set accuracy and targetOffset.
If the two icons are close together, and will always appear the same way, and the space between them will always appear the same, then a
click(imageOfTwoIcons).targetOffset(x,y)
is probably the simplest way to go. But, if there is anything that would make this method unreliable (anything between the two icons ever appears differently than when you are making your screen capture of them)--
You could also use the python sorted() function to sort the images by their position. For example, if one image is always above the other, then you could find both images and sort them by their y coordinate, like so:
#a little prep for the sorted function to get the y coord of the icon
def byY(icon):
return icon.y
#findAll() on your two identical icons and make them into a list
bothIcons = list([x for x in findAll(icon)])
#then sort them
sortedIcons = sorted(bothIcons, key=byY)
iconOnTop = sortedIcons[0]
iconOnBottom = sortedIcons[1]
#then click on the one you want
click(iconOnTop) #or save a line and say: click(sortedIcons[0])
The same can be done if you know that the icon of interest is always left or right of its twin:
def byX(yourTwoImages):
return image.x
bothIcons = list([x for x in findAll(icon)])
sortedIcons = sorted(bothIcons, key=byX)
click(sortedIcons[0]) #for the image on the left
I like this better than working with regions if the two icons are very close together on the screen, or if it's possible for the icons' placement to ever change.
you can enlarge the buttons image, so that the image will include more than just the image, but also the background around it (if you can be sure that the background is not changing) but remember that sikuli clicks on the center of the image, so make sure that the button is in the center.
another option is to click using offset (http://doc.sikuli.org/tutorials/checkone/checkone.html)
use something like this:
this.offset = 15;
org.sikuli.script.Region reg = screen.find("image").left(this.offset);
screen.click(reg);

CSS positioning of images and labels on div

I'm developing a kind of list where my elements are clickable. I already used this code and now I have this:
However, now I need to add some more elements (one or two buttons, 1 label, and 1 image) like in the following picture.
How can I achieve this?
Thanks in advance!
http://jsfiddle.net/SaRnR/9/ - here you have it :) updated. Put your buttons inside the buttonContainer

How to enable dragging in QGraphicsScene?

I'm trying to put two pictures in the QGraphicsScene. One is fixed and the other one is movable. But I succeed only in putting those pictures in the QGraphicsScene, I can't move them. How can I achieve this?
You have to make sure the item is movable. Have a look at QGraphicsItem::setFlag.
You'll have to do something like this :
myImageItem->setFlag(QGraphicsItem::ItemIsMovable, true);

Resources