Results 1 to 4 of 4

Thread: Two bugs in Qt

  1. #1
    Join Date
    Dec 2010
    Location
    Ukraine, Kharkiv
    Posts
    17
    Thanks
    3
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Exclamation Two bugs in Qt

    Qt Code:
    1. QSizePolicy sizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
    2. frame->setSizePolicy(sizePolicy);
    To copy to clipboard, switch view to plain text mode 

    then frame will resize on MAXIMUM area.

    If
    Qt Code:
    1. QSizePolicy sizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum);
    To copy to clipboard, switch view to plain text mode 

    then frame will resize on MINIMUM area.

    How can programmers miss such thing, I don't understand

    Another one.

    if write such code:
    Qt Code:
    1. contentListView->setFlow(QListView::TopToBottom);
    To copy to clipboard, switch view to plain text mode 
    then icons or another items will flow from LEFT to RIGHT
    and if
    Qt Code:
    1. menuListView->setFlow(QListView::LeftToRight);
    To copy to clipboard, switch view to plain text mode 
    then from TOP to BOTTOM.


    Please, tell me, why I have such a problem?
    I'm using Windows XP SP3, Eclipse and last sdk. What else info need? I can provide anything.

  2. #2
    Join Date
    Jan 2006
    Location
    travelling
    Posts
    1,116
    Thanks
    8
    Thanked 127 Times in 121 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Two bugs in Qt

    From QSizePolicy docs :
    QSizePolicy::Minimum GrowFlag The sizeHint() is minimal, and sufficient. The widget can be expanded, but there is no advantage to it being larger (e.g. the horizontal direction of a push button). It cannot be smaller than the size provided by sizeHint().

    QSizePolicy::Maximum ShrinkFlag The sizeHint() is a maximum. The widget can be shrunk any amount without detriment if other widgets need the space (e.g. a separator line). It cannot be larger than the size provided by sizeHint().
    In other words a Maximum size policy will incite layouts to shrink the widget to accomodate neighbours that want more space and a Minimum size policy has the reverse effect (trying to reclaim space from neighbours). You may be confused by the names but there is no bug in Qt.

    I did not check the list view flow issue but I'm reasonably sure if it was an actual bug and not just a misunderstanding on your part (or a blatant failure to read the docs) it would have been reported by now. By the way, the best way to get bugs fixed, if you do find some, is to file a bug report instead of bitching on the forums.
    Current Qt projects : QCodeEdit, RotiDeCode

  3. #3
    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: Two bugs in Qt

    Quote Originally Posted by Chiz View Post
    How can programmers miss such thing, I don't understand
    Please, tell me, why I have such a problem?
    I'm using Windows XP SP3, Eclipse and last sdk. What else info need? I can provide anything.
    It is not enough to say you found a bug in some property just by arbitrary changing that property value because the final behaviour depends on the whole environment. As you were already shown, result of using Maximum and Minimum size policies depends on other widgets present (and visible) in the window. The same goes with your other "bug". The flow depends on things such as the wrapping property and a couple of other things.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  4. #4
    Join Date
    Dec 2010
    Location
    Ukraine, Kharkiv
    Posts
    17
    Thanks
    3
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Two bugs in Qt

    I understand. Thanks!

Similar Threads

  1. Bugs in QwtMatrixRasterData?
    By alex_sh in forum Qwt
    Replies: 13
    Last Post: 23rd January 2011, 12:59
  2. Qwt 6.0.0-rc3 bugs
    By Vortex in forum Qwt
    Replies: 1
    Last Post: 30th October 2010, 10:24
  3. [OT] closing of qt bugs
    By luf in forum Qt Programming
    Replies: 0
    Last Post: 26th July 2010, 14:55
  4. 4.3.1 vs 4.1.4 setfixedwidth (bugs??)
    By zorro68 in forum Qt Programming
    Replies: 1
    Last Post: 23rd September 2007, 15:21
  5. Bugs, style changes in 4.1.0?
    By simk in forum Qt Programming
    Replies: 13
    Last Post: 13th February 2006, 12:05

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.