Results 1 to 11 of 11

Thread: Problem changing background of a child QWidget in Qt 4.1.X

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts

    Default Re: Problem changing background of a child QWidget in Qt 4.1.X

    Quote Originally Posted by thawkins
    Is there any way of adding some type of conditional compile statement into the code which recognizes Qt 4.0.X versus Qt 4.1.3? I would like to have the code maintain backward compatability (transparently if possible) with older revisions of Qt 4.0.X or higher.
    QT_VERSION
    J-P Nurmi

  2. The following user says thank you to jpn for this useful post:

    thawkins (2nd June 2006)

  3. #2
    Join Date
    Jun 2006
    Location
    USA
    Posts
    6
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Unhappy Re: Problem changing background of a child QWidget in Qt 4.1.X

    I am still having the same problem with QFrame changing the background color.

    I am using Qt 4.1.1 with Visual Studio .NET 2003.
    It works perfectly fine with Visual Studio 6.0.

    Has anybody seen this?

  4. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    28
    Thanked 976 Times in 912 Posts

    Default Re: Problem changing background of a child QWidget in Qt 4.1.X

    Quote Originally Posted by newby
    I am using Qt 4.1.1 with Visual Studio .NET 2003.
    It works perfectly fine with Visual Studio 6.0.
    Do you use the same Qt version with both of these toolchains?

  5. #4
    Join Date
    Jun 2006
    Location
    USA
    Posts
    6
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problem changing background of a child QWidget in Qt 4.1.X

    Yes. I am using the same Qt 4.1.1 with both Visual Studio .NET 2003 and Visual Studio 6.0

  6. #5
    Join Date
    Jun 2006
    Location
    USA
    Posts
    6
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problem changing background of a child QWidget in Qt 4.1.X

    It displays the correct color when the child QFrame is selected with mouse click or all children QFrames are selected.

  7. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    28
    Thanked 976 Times in 912 Posts

    Default Re: Problem changing background of a child QWidget in Qt 4.1.X

    Quote Originally Posted by newby
    It displays the correct color when the child QFrame is selected with mouse click or all children QFrames are selected.
    Does it work when you start your application like this:
    C:...\> app.exe -style plastique
    or
    C:...\> app.exe -style windows
    ?

  8. #7
    Join Date
    Jun 2006
    Location
    USA
    Posts
    6
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Problem changing background of a child QWidget in Qt 4.1.X

    Yes. It works with both those styles.

  9. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    28
    Thanked 976 Times in 912 Posts

    Default Re: Problem changing background of a child QWidget in Qt 4.1.X

    Quote Originally Posted by newby
    Yes. It works with both those styles.
    So most likely the problem lies in QWindowsXPStyle. Try a newer Qt version to see if the problem was fixed.

Similar Threads

  1. QScrollArea problem positioning a QWidget inside
    By Spectator in forum Qt Programming
    Replies: 4
    Last Post: 20th February 2006, 22:59

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
  •  
Qt is a trademark of The Qt Company.