Results 1 to 8 of 8

Thread: Inherited Palette Problem

  1. #1
    Join Date
    Dec 2008
    Location
    Istanbul, TURKEY
    Posts
    537
    Thanks
    14
    Thanked 13 Times in 13 Posts
    Qt products
    Qt4
    Platforms
    Windows Android

    Default Inherited Palette Problem

    Hi,

    I have widgets one inside another. The problem is the child widget inherits all the palette of its parent. How can I get rid of using the inherited palette? And how can I perform this using the designer?

    Actually, my problem is about styling list widget. Once list widget owns a parent, I can't move the scroll bar of the list widget up! Please check out the ui file I attached.

    Thanks.
    Attached Files Attached Files
    Last edited by zgulser; 9th March 2010 at 12:57.

  2. #2
    Join Date
    Mar 2008
    Location
    France
    Posts
    149
    Thanks
    2
    Thanked 21 Times in 21 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Inherited Palette Problem

    Why do you put listwidget_2 in a different QWidget?
    Wouldn't it be better to have the same parent for every single widgets added?

  3. #3
    Join Date
    Dec 2008
    Location
    Istanbul, TURKEY
    Posts
    537
    Thanks
    14
    Thanked 13 Times in 13 Posts
    Qt products
    Qt4
    Platforms
    Windows Android

    Default Re: Inherited Palette Problem

    I put widgets sometimes inside another to ease the modularity and organization of them. No any reason.

    But anyway, have you got a solution or idea regarding the situation above?

  4. #4
    Join Date
    Mar 2008
    Location
    France
    Posts
    149
    Thanks
    2
    Thanked 21 Times in 21 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Inherited Palette Problem

    Try to make your design simplier.

  5. #5
    Join Date
    Dec 2008
    Location
    Istanbul, TURKEY
    Posts
    537
    Thanks
    14
    Thanked 13 Times in 13 Posts
    Qt products
    Qt4
    Platforms
    Windows Android

    Default Re: Inherited Palette Problem

    Thank you for your suggestion but I think my design is not that complicated. There should be something in qt to prevent inheriting parents style that I haven't found yet.

  6. #6
    Join Date
    Mar 2008
    Location
    France
    Posts
    149
    Thanks
    2
    Thanked 21 Times in 21 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Inherited Palette Problem

    Simplifies it to see if the error occurs again.

    Once list widget owns a parent, I can't move the scroll bar of the list widget up
    By the way i am able to move both scrollbars.

  7. #7
    Join Date
    Dec 2008
    Location
    Istanbul, TURKEY
    Posts
    537
    Thanks
    14
    Thanked 13 Times in 13 Posts
    Qt products
    Qt4
    Platforms
    Windows Android

    Default Re: Inherited Palette Problem

    I'm able to move the scroll bar of the list widget up and down as well but only with mouse scroll.

    The real problem is - the scroll bar grabs the mouse press but only moves downward when I drag the scroll bar up or down by mouse press.

    Catch that?
    Last edited by zgulser; 10th March 2010 at 10:07.

  8. #8
    Join Date
    Dec 2008
    Location
    Istanbul, TURKEY
    Posts
    537
    Thanks
    14
    Thanked 13 Times in 13 Posts
    Qt products
    Qt4
    Platforms
    Windows Android

    Default Re: Inherited Palette Problem

    By the way,

    the reason could not be related with only QPalette. Style sheet also can be affecting it. Thus, it is useful to say that my real concern is - not to inherit any style of the parent widget.

Similar Threads

  1. Signals from inherited widgets
    By pippo42 in forum Qt Programming
    Replies: 5
    Last Post: 25th February 2010, 09:47
  2. Inherited Style Sheet
    By johnmauer in forum Qt Programming
    Replies: 1
    Last Post: 2nd January 2010, 21:07
  3. How QMessageBox can be inherited.
    By rajveer in forum Qt Programming
    Replies: 40
    Last Post: 10th September 2008, 14:27
  4. Mess with inherited constructors
    By Pepe in forum Newbie
    Replies: 8
    Last Post: 8th September 2007, 17:16
  5. basic inherited or vector problem?
    By mickey in forum General Programming
    Replies: 8
    Last Post: 14th February 2007, 20:29

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.