Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Cannot make QQuickView transparent
Forum Updated to NodeBB v4.3 + New Features

Cannot make QQuickView transparent

Scheduled Pinned Locked Moved QML and Qt Quick
5 Posts 3 Posters 1.7k 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.
  • K Offline
    K Offline
    Kaluss
    wrote on last edited by
    #1

    I have additional problem with QQuickView(),
    namely I couldn't set transparency for it.
    If I set ->setColor(QColor(0,0,0,0)) it's starting to be black.

    setColor(Qt::transprarent) also dosn't help.

    Anyone know smth about ?

    BR
    Tomek

    [EDIT: Split into a new thread. Please start new threads for new questions. --JKSH]

    1 Reply Last reply
    0
    • JKSHJ Online
      JKSHJ Online
      JKSH
      Moderators
      wrote on last edited by
      #2

      Hi,

      In the future, please start a new thread for new questions.

      Anyway, you need to call QQuickWindow::setDefaultAlphaBuffer(true) before you create your QQuickView. See http://qt-project.org/doc/qt-5/qquickwindow.html#setDefaultAlphaBuffer

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      1 Reply Last reply
      0
      • K Offline
        K Offline
        Kaluss
        wrote on last edited by
        #3

        It doesn't help.
        The window still starting to be completly black...

        1 Reply Last reply
        0
        • K Offline
          K Offline
          Kaluss
          wrote on last edited by
          #4

          code:

          @ QQuickWindow::setDefaultAlphaBuffer(true);
          this->viewQML = new QQuickView();
          this->viewQML->setFlags(Qt::FramelessWindowHint);
          this->viewQML->setColor(QColor(0, 0, 0, 0));
          this->containerQML = QWidget::createWindowContainer( this->viewQML, this );
          this->containerQML->adjustSize();
          this->containerQML->setFocusPolicy( Qt::TabFocus );
          this->containerQML->setMinimumSize( 75, 75 );

          @

          [edit: please wrap your code in @tags, Eddy]

          1 Reply Last reply
          0
          • EddyE Offline
            EddyE Offline
            Eddy
            wrote on last edited by
            #5

            I would expect to use this in your main before any qml file is loaded.

            Hope it helps

            Qt Certified Specialist
            www.edalsolutions.be

            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