Results 1 to 4 of 4

Thread: How to make overlapping widgets opaque ?

  1. #1
    Join Date
    May 2010
    Posts
    46
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Symbian S60

    Question How to make overlapping widgets opaque ?

    I have a mainwindow displaying some icons in a listview. I have another custom widget, which displays some images in a gridview. When I instantiate the custom widget as a child of the mainwindow & make it visible, it is displayed on top of the listview, it overlaps the listview & the empty spaces in the widget dont hide the listview.

    The image below explains the scenario. The space above the customwidget should also be hidden ( i.e the listview icons must not be displayed ).

    mainwindow_screenshot.JPG

    How to go about this ?

  2. #2
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to make overlapping widgets opaque ?

    i think you should make the background palette of your custom widget to some color.

  3. #3
    Join Date
    May 2010
    Posts
    46
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Symbian S60

    Question Re: How to make overlapping widgets opaque ?

    Thanks; this seems to be the only solution available for this problem

  4. #4
    Join Date
    Jan 2006
    Location
    Alingsås, Sweden
    Posts
    437
    Thanks
    3
    Thanked 39 Times in 39 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to make overlapping widgets opaque ?

    You could set the autoFillBackground flag to false as well. Widgets aren't really ment to be overlapping, so you are bound to run into issues when trying such things.

Similar Threads

  1. QGraphicsItem mousePressEvent only on opaque pixels
    By jonks in forum Qt Programming
    Replies: 1
    Last Post: 15th February 2010, 10:24
  2. Overlapping Widgets and the Application
    By csvivek in forum Qt Programming
    Replies: 1
    Last Post: 2nd May 2008, 16:32
  3. Replies: 1
    Last Post: 27th March 2008, 15:10
  4. overlapping canvases
    By quickNitin in forum Newbie
    Replies: 11
    Last Post: 8th October 2006, 11:22
  5. opacity of QLabel(background opaque)
    By Stephano in forum Qt Tools
    Replies: 1
    Last Post: 9th May 2006, 12:57

Tags for this Thread

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.