Results 1 to 6 of 6

Thread: Strange GUI rendering difference between winXP vs. win7

  1. #1

    Default Strange GUI rendering difference between winXP vs. win7

    Imagine I have a mainwindow. It has a background image with transparency on the corners, making them curved.

    On that is a pictureframe, taking around 2/3 of the area, and while the mainform's background is grayish, the pictureframe's content is currently black - so I can see the edges clearly.

    Just below the pictureframe is a QWidget, supposed to align horizontally with it, and touching its lower border.

    Now, on WinXP (with classic style enabled, i.e. win2k look), they do align, strangely, when the QWidget is a bit smaller in width, e.g. 700px vs. 704px. How can that be explained?

    Then, on Win7 (default style), they do not align, the widget is missing a few rows of pixels left and right, like normally expected.

    The mainwindow and pictureframe have only a background image assignment in their stylesheets.
    The widget's stylesheet: background-color: rgba(0,0,0,255);

    So - what's going on there?

  2. #2
    Join Date
    Mar 2008
    Location
    Kraków, Poland
    Posts
    1,536
    Thanked 284 Times in 279 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Strange GUI rendering difference between winXP vs. win7

    Is main window has a fixed size or has some layout manager ?

  3. #3

    Default Re: Strange GUI rendering difference between winXP vs. win7

    The main window has a fixed size, yes, and all widgets on it keep the same position and size.
    One big widget is invisible, usually. (it's a tab widget with "advanced options", and lies under (i.e., same position as) the pictureframe, which would be made invisible if the tab thing is enabled).

  4. #4
    Join Date
    Mar 2008
    Location
    Kraków, Poland
    Posts
    1,536
    Thanked 284 Times in 279 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Strange GUI rendering difference between winXP vs. win7

    And this is a problem. Different styles in different ways using the surface of the window.

  5. #5

    Default Re: Strange GUI rendering difference between winXP vs. win7

    well, but it doest not help if I do this at program start, with the invisible tab widget which normally lies under the visible ones:
    tabthing->resize(0,0);
    tabthing->move(0,0);

    Should it not be out of the way then, and have no effect?
    Well, it doesn't do anything.

  6. #6
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Strange GUI rendering difference between winXP vs. win7

    Exact behaviour will depend on the type of the picture frame and the widget beneath the picture frame. The unadorned QWidget under the picture has no visual appearance and should be invariant in size with style changes. If the "pictureframe" is a QFrame derivative then its border will be rendered differently with style, probably wider overall under Win 7 than classic.

    Strikes me that the alignment can be ensured using a layout.

Similar Threads

  1. Replies: 8
    Last Post: 7th November 2012, 19:20
  2. Register QtCreator on Win7?
    By weaver4 in forum Newbie
    Replies: 7
    Last Post: 5th April 2012, 23:30
  3. Replies: 5
    Last Post: 19th January 2012, 06:14
  4. Problem in reading xml in win7
    By athulms in forum Newbie
    Replies: 3
    Last Post: 14th October 2011, 10:00
  5. EXE compiled in Win7 NOT working in XP
    By fakhir in forum Newbie
    Replies: 3
    Last Post: 13th September 2010, 09:03

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.