Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Transparent effect is not working in Qt5
Forum Updated to NodeBB v4.3 + New Features

Transparent effect is not working in Qt5

Scheduled Pinned Locked Moved Mobile and Embedded
qt5 vs qt4linuxarmtransparency
13 Posts 3 Posters 6.2k Views 2 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.
  • A Offline
    A Offline
    Ava6
    wrote on last edited by
    #1

    An application I wrote with C++, Qt4, works fine on ARM board of Linux operating system. But when I try to run it in Qt5( after modification and re-compilation of course ), the parts where there are transparent effects is not working.
    The pixmap used in a drag-drop, has a transparent part. But during a draging, the pixmap's transparent part is black, instead of transparent.
    I want to set a widget's transparency in paintEvent with painter.fillRect( QRect( 0, 0, 800, 480 ), QColor( 0, 0, 0, 40 ) ). But it shows black regardless of my setting.
    Has anyone dealt with this before? Or anyone has any ideas, please let me know. I will appreciate that. Thanks a lot.

    1 Reply Last reply
    1
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Which plugin are you using ? And which version of Qt 5 ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      A 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi and welcome to devnet,

        Which plugin are you using ? And which version of Qt 5 ?

        A Offline
        A Offline
        Ava6
        wrote on last edited by
        #3

        @SGaist Thank you very much. Uh, the plugin is tslib? Does that count? And it's Qt5.2.1.
        There is another thing though, when it comes to QML, only the QtQuick 1.x can work properly, QtQuick 2.x will only show a black area. Just so you know. I don't know if this is relevant.
        Thanks again.

        1 Reply Last reply
        0
        • P Offline
          P Offline
          PhTe
          wrote on last edited by
          #4

          Maybe it has to do with the window manager.
          As far as i know, Qt4 uses its own window manager and Qt5 needs an external one for composing.

          A 1 Reply Last reply
          0
          • P PhTe

            Maybe it has to do with the window manager.
            As far as i know, Qt4 uses its own window manager and Qt5 needs an external one for composing.

            A Offline
            A Offline
            Ava6
            wrote on last edited by
            #5

            @PhTe Well, I don't know about Qt's window manager. But the same pixmap that used during a dragging, if it is used in a widget like QListWidget, QToolButton, the transparent part looks normal. What's the difference between these two situations?

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              tslib is the input plugin for touchscreen handling.

              Are you using linuxfb ? eglfs ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              A 1 Reply Last reply
              0
              • SGaistS SGaist

                tslib is the input plugin for touchscreen handling.

                Are you using linuxfb ? eglfs ?

                A Offline
                A Offline
                Ava6
                wrote on last edited by
                #7

                @SGaist Yes. It's linuxfb.

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  Ok, then there's your problem: linuxfb is not enough for QtQuick2. You should use the eglfs plugin for Qt Quick 2 since OpenGL is a hard requirement for this module.

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  A 1 Reply Last reply
                  0
                  • SGaistS SGaist

                    Ok, then there's your problem: linuxfb is not enough for QtQuick2. You should use the eglfs plugin for Qt Quick 2 since OpenGL is a hard requirement for this module.

                    A Offline
                    A Offline
                    Ava6
                    wrote on last edited by
                    #9

                    @SGaist So that's the problem, thanks a lot. To solve this, I have to re-transplant Qt with elgfs platform, right?
                    But the transparent thing I talked about, the code I used is pure C++, no qml at all. It still has something to do with elgfs platform?

                    1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      Recompile ? Yes

                      So transparency on a pure QWidget project ?

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      0
                      • A Offline
                        A Offline
                        Ava6
                        wrote on last edited by
                        #11

                        Thanks.
                        Yes, no QtQuick involved, just QWidget.

                        1 Reply Last reply
                        0
                        • SGaistS Offline
                          SGaistS Offline
                          SGaist
                          Lifetime Qt Champion
                          wrote on last edited by
                          #12

                          Check that thread it might help

                          Interested in AI ? www.idiap.ch
                          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                          A 1 Reply Last reply
                          0
                          • SGaistS SGaist

                            Check that thread it might help

                            A Offline
                            A Offline
                            Ava6
                            wrote on last edited by
                            #13

                            @SGaist Thanks. I'll give it a look.

                            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