Results 1 to 2 of 2

Thread: QPushButton rounded corners glitch

  1. #1
    Join Date
    Jul 2019
    Posts
    2
    Qt products
    Qt5
    Platforms
    Windows

    Default QPushButton rounded corners glitch

    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:

    61eb14d9b20e3156d01750f288418693.png

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

    622490ef2fc3939ddfadb60d8cfbffb4.png

    The stylesheet I'm using for my button is this:
    Qt Code:
    1. {
    2. 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));
    3. border-style: solid;
    4. border-radius: 10px;
    5. }
    To copy to clipboard, switch view to plain text mode 

    The Qt version I'm using right now is Qt 5.13.0, and the command I used to compile it are as following:
    Qt Code:
    1. C:\Qt\5.13.0\Src\configure -debug-and-release -static -static-runtime -prefix "C:\Qt\5.13.0\msvc2017_64_static"
    To copy to clipboard, switch view to plain text mode 

    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!

  2. #2
    Join Date
    Jul 2019
    Posts
    2
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: QPushButton rounded corners glitch

    Alright so it seems to be fixed by adding the following flags to the compilation:
    Qt Code:
    1. 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
    To copy to clipboard, switch view to plain text mode 

    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.

Similar Threads

  1. QGraphicsRectItem rounded corners
    By forty-two in forum Qt Programming
    Replies: 1
    Last Post: 3rd July 2012, 23:44
  2. Rounded corners for a QWidget
    By Ying in forum Qt Programming
    Replies: 5
    Last Post: 2nd September 2011, 08:46
  3. QDialog with rounded corners
    By rossm in forum Qt Programming
    Replies: 2
    Last Post: 28th April 2009, 00:31
  4. Toplevel widget with rounded corners.
    By munna in forum Qt Programming
    Replies: 7
    Last Post: 18th August 2006, 21:46
  5. widget with rounded corners
    By sreedhar in forum Qt Programming
    Replies: 4
    Last Post: 7th June 2006, 13:18

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.