Results 1 to 6 of 6

Thread: Widget corruption

  1. #1
    Join Date
    May 2006
    Location
    ŁÃ³dź, Poland
    Posts
    7
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Angry Widget corruption

    Hi,

    I've been having problems recently with Qt Designer randomly corrupting my widgets. This happens automagically when I save a form and is hard to debug, since it usually takes some time from saving a form to the moment when I notice the broken result (especially since I use QStackedWidget and don't inspect all the "tabs" every time). Here are the screenshots showing what's happening:

    http://stealth.math.uni.lodz.pl/~grzywacz/before.png

    save, reload:

    http://stealth.math.uni.lodz.pl/~grzywacz/after.png

    Has anyone seen anything like that before? Thanks in advance for any help!
    Last edited by grzywacz; 27th May 2006 at 18:33.
    Kind regards,
    Karol "grzywacz" Nowak

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Widget corruption

    Hello Karol,

    Are you using layouts? Probably not and you should as this would probably fix your problem. And be sure not to use Qt4.0 as it contains many bugs in Designer code.

  3. #3
    Join Date
    May 2006
    Location
    ŁÃ³dź, Poland
    Posts
    7
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Widget corruption

    Thanks for a quick reply!

    No, I don't use layouts as I need to have those widgets scattered in a more or less random way and I can't really accomplish that with layouts (at least not unless I fill them with tons of invisible widgets).

    I use Qt 4.1.2 and plan to keep doing so... If that's an unavoidable Designer bug then I'll have to live with it. Thanks to programmers of svn I can revert the breakage with little trouble...
    Kind regards,
    Karol "grzywacz" Nowak

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Widget corruption

    Honestly I don't experience such problems with my installation. Is this a random effect or did you notice some regularities on when and how this happens? Did you try looking at the ui file with a text editor? Maybe svn (or something else) corrupted it?

  5. #5
    Join Date
    May 2006
    Location
    ŁÃ³dź, Poland
    Posts
    7
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Widget corruption

    This doesn't happen every time, that's why it's so annoying. And yes, I did look at the .ui file, here's what changed between the correct and broken version:

    Underlaying QFrame's size has changed:
    - <width>800</width>
    - <height>600</height>
    + <width>512</width>
    + <height>307</height>

    And the same thing has happened to all three buttons on top of it:
    - <width>150</width>
    - <height>128</height>
    + <width>512</width>
    + <height>307</height>

    - <width>150</width>
    - <height>128</height>
    + <width>512</width>
    + <height>307</height>

    - <width>150</width>
    - <height>128</height>
    + <width>512</width>
    + <height>307</height>

    Looks as if the change has been somehow propagated to other widgets (not that I recall resizing the QFrame itself, that wouldn't look ok). I've also seen a similliar problem with QTabWidget.

    edit: yes, I've corrected the .ui file by hand and from then on everything seems to work fine.
    Kind regards,
    Karol "grzywacz" Nowak

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Widget corruption

    I'd still suggest using layouts.

Similar Threads

  1. minimize child widget
    By sreedhar in forum Qt Programming
    Replies: 5
    Last Post: 15th May 2006, 12:02
  2. Replies: 4
    Last Post: 24th March 2006, 22:50
  3. Forwarding mouse events to another widget.
    By yogeshm02 in forum Qt Programming
    Replies: 8
    Last Post: 28th February 2006, 13:25
  4. [Qt 4.1.0] Split a widget on demand
    By Townk in forum Qt Programming
    Replies: 3
    Last Post: 17th February 2006, 14:16
  5. advanced split widget
    By vitaly in forum Qt Programming
    Replies: 10
    Last Post: 24th January 2006, 20:00

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.