Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Borderless transparent QQuickView

Borderless transparent QQuickView

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 1.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    Gustorn
    wrote on last edited by
    #1

    Hello, I've recently started to mess around with Qt, but i ran into something I can't seem to be able to solve: I'm trying to make a borderless QtQuick 2.0 project with rounded borders, so i wanted to get rid of the white background behind my actual UI. This is my code from main(I actually created a new project for testing, this is from there):
    @
    int main(int argc, char *argv[])
    {
    QGuiApplication app(argc, argv);
    QtQuick2ApplicationViewer viewer;

    viewer.setFlags(Qt::FramelessWindowHint);
    viewer.setColor(QColor(0,0,0,0));
    viewer.setMainQmlFile(QStringLiteral("qml/main.qml"));
    viewer.showExpanded();
    return app.exec();
    

    }
    @
    My problem is the following: when I start the program, the UI is completely invisible(and it stays invisible unless the alpha on the QColor is 255. The problem is only there if the FramelessWindowHint flag is set. Is there any way around this? Or is it just me doing something wrong? Thanks in advance

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved