How to round specific corners of a View?

Demo (Source code is available at the end of the post) iOS 16+ built-in modifier (Xcode 15 needed) Clip the view using the new UnevenRoundedRectangle: .clipShape( .rect( topLeadingRadius: 0, bottomLeadingRadius: 20, bottomTrailingRadius: 0, topTrailingRadius: 20 ) ) ⚠️ Note: Although it works from iOS 16, .rect needs Xcode 15 to be available. iOS 13+ You … Read more

Creating A GUI from scratch in C++ or assembly [closed]

In order to create a window you’ll need to interface with whatever windowing system is currently present on your operating system. This will either require system calls if the window manager runs in kernel space (as is the case in Windows) or some sort of interprocess communication for user space window managers (like X). To … Read more

Java 8 poor GUI performance compared to Java 6

According to my profiler, the operation spends most of the time in the method Thread.holdsLock, which can be indeed a costly operation, which is called by Component.checkTreeLock which is called indirectly by Component.updateCursorImmediately. Generally, you can avoid costly visual updates when updating multiple components by calling getContentPane().setVisible(false); right before the operation and getContentPane().setVisible(true); right afterwards, … Read more

How do I set the QComboBox width to fit the largest item?

Qt (4.6) online documentation has this to say about QComboBox: enum SizeAdjustPolicy { AdjustToContents, AdjustToContentsOnFirstShow, AdjustToMinimumContentsLength, AdjustToMinimumContentsLengthWithIcon } I would suggest ensuring the SizeAdjustPolicy is actually being used setting the enum to AdjustToContents. As you mention a .ui file I suggest doing that in Designer. Normally there shouldn’t be anything fancy in your constructor at … Read more