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. Transparency on QStackedWidget?
Forum Updated to NodeBB v4.3 + New Features

Transparency on QStackedWidget?

Scheduled Pinned Locked Moved General and Desktop
5 Posts 3 Posters 6.0k 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.
  • A Offline
    A Offline
    AlanH
    wrote on last edited by
    #1

    Hello,

    I’m new to the QT world, so if there is a previous post that answers this question please point me at it.

    I'm looking for a little help with the QStackedWidget.

    Is it possible to manipulate the properties such that one layer of the stack is transparent , so that an underlying layer can still be seen? Further can buttons place on this transparent layer also be transparent, but still be activated the same way as if they were not transparent?

    Thank you for any advice or direction that you can provide.

    1 Reply Last reply
    0
    • frankcyblogic.deF Offline
      frankcyblogic.deF Offline
      frankcyblogic.de
      wrote on last edited by
      #2

      Sounds like you are looking for the QGraphicsView framework. Of course you can always place the widgets yourself with setGeometry and some of them could be transparent. But QWidget does not support event propagation for overlapping widgets very well.

      1 Reply Last reply
      0
      • A Offline
        A Offline
        AlanH
        wrote on last edited by
        #3

        Thank you, I'll have to investigate. I was hoping to avoid doing much in the way of painting etc.

        If I didn't want the functionality of the button action, but just the transparent overlay? Would that be possible with the QStackedWidget?

        1 Reply Last reply
        0
        • frankcyblogic.deF Offline
          frankcyblogic.deF Offline
          frankcyblogic.de
          wrote on last edited by
          #4

          QStackedWidget is not designed for transparency as far as I know.

          1 Reply Last reply
          0
          • S Offline
            S Offline
            srikanth_trulyit
            wrote on last edited by
            #5

            Ideally QStackedWidget is used to put mutiple widgets in it but only one widget visible at any time (which is on top of the stack). In your case you need a transparent layer (hence another widget which is transparent), hence I don't see any difference if the underlying widget is QStackedWidget or something else. As mentioned before, go for QGraphicsView to create multiple layers.

            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