View Full Version : QPushButton rounded corners glitch

15th July 2019, 16:23
Hi everyone,

So what I'm trying to do is get a QPushButton with rounded corners. Obviously this should work fine, this is what mine looks it looks like with the standard Qt compiler:


However as soon as I use my statically compiled version of Qt it looks like this:


The stylesheet I'm using for my button is this:

background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(0, 166, 255, 255), stop:1 rgba(0, 51, 255, 255));
border-style: solid;
border-radius: 10px;

The Qt version I'm using right now is Qt 5.13.0, and the command I used to compile it are as following:

C:\Qt\5.13.0\Src\configure -debug-and-release -static -static-runtime -prefix "C:\Qt\5.13.0\msvc2017_64_static"

Could it perhaps be that I'm missing some dependencies, seeing that one of my older static compilations of Qt (5.12.0) works as intended, however, it uses two more libraries: preprocessor.lib and translator.lib. I've looked around the internet and couldn't find anything useful surrounding these libraries.

Any help is appreciated!

16th July 2019, 13:55
Alright so it seems to be fixed by adding the following flags to the compilation:

C:\Qt\5.13.0\Src\configure -debug-and-release -static -static-runtime -opengl desktop -optimize-size -prefix "C:\Qt\5.13.0\msvc2017_64_static" -nomake tests -nomake examples

I suspect that it was the -opengl desktop flag, however, I can't be certain, only way to know is to compile by removing some of these flags which takes ages of course.