Results 1 to 12 of 12

Thread: Where to submit a bug?

  1. #1
    Join Date
    Sep 2009
    Posts
    13
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Where to submit a bug?

    Hello out there,
    I believe I found a bug in one of Qt's widgets and now I have 2 questions:
    1) Where do I submit this bug?
    2) What is the preferred format for reporting a bug?
    I believe that posting a complete project (together with a description of expected versus real behaviour) would be the most efficient way to have a developer (try to) reproduce it - but maybe the rules are different?

    Thanks for any enlightenment and best regards
    Helmut Giese

  2. #2
    Join Date
    Dec 2008
    Location
    TaganrogNativelandChehov,Russia
    Posts
    64
    Thanks
    1
    Thanked 8 Times in 7 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Where to submit a bug?

    east or west home is best

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

    Default Re: Where to submit a bug?

    What is the bug, by the way?
    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
    Sep 2009
    Posts
    13
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Where to submit a bug?

    Hello,
    @kwisp Thanks, this was fast.

    @wysota
    I changed the 'findfiles' example from the distribution (examples/dialogs/findfiles) to enable sorting (you know: click on the header of a column and the table gets sorted on the content of this particular column).
    In the original version file sizes showed up as expected.
    In the modified version most (almost all) files have no size any more and the one(s) that do have a size appear to have a wrong value.

    The change I made was adding one line into the creation code for the table (see below).
    Qt Code:
    1. void Window::createFilesTable()
    2. {
    3. filesTable = new QTableWidget(0, 2);
    4. filesTable->setSelectionBehavior(QAbstractItemView::SelectRows);
    5.  
    6. QStringList labels;
    7. labels << tr("File Name") << tr("Size");
    8. filesTable->setHorizontalHeaderLabels(labels);
    9. filesTable->horizontalHeader()->setResizeMode(0, QHeaderView::Stretch);
    10. filesTable->verticalHeader()->hide();
    11. filesTable->setShowGrid(false);
    12.  
    13. // This line added
    14. filesTable->setSortingEnabled(true);
    15.  
    16. connect(filesTable, SIGNAL(cellActivated(int, int)),
    17. this, SLOT(openFileOfItem(int, int)));
    18. }
    To copy to clipboard, switch view to plain text mode 
    This is on Windows XP using the stand-alone Qt Creator 1.2.1 (based on Qt 4.5.2).
    I'll go and report it.
    Best regards
    Helmut Giese

  5. #5
    Join Date
    Mar 2007
    Location
    Germany
    Posts
    229
    Thanks
    2
    Thanked 29 Times in 28 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Where to submit a bug?

    I could reproduce this.
    When the new line filesTable->setSortingEnabled(true); is moved after the call of findFiles() (line 132) the file sizes are displayed correctly.
    So the sorting does weird things to table content.

    But honestly I believe that the problem lies not in Qt itself, but in the example.
    The example inserts a row and afterwards fills file name and file size to the row.
    When sorting is enabled the row number that showFiles() uses is not the number where the row was inserted. The sorting moved the row.
    If the example should work it should either sort after inserting all rows (see above) or better take care of where QTableWidgetItems are inserted.

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

    Default Re: Where to submit a bug?

    This is not a bug in Qt. This is the fault of architecture of the example. If you disable sorting temporarily during the run of the loop in Window::showFiles(), everything will be correct. Analyze the loop to see why.
    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.


  7. #7
    Join Date
    Sep 2009
    Posts
    13
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Where to submit a bug?

    Hi there,
    @Boron Thanks for trying it out and for the analysis. If I disable/enable sorting around the filling operation everything works. This "bug" has cost me - no I won't tell in public.

    @wysota I wonder: If there were an 'append' method, adding rows and sorting them would not step on each others feet - but such a method does not seem to exist.

    Another question (if I may): When sorting I want _all_ directories always shown before _any_ files so I need some kind of "custom sort". I wonder: Is a QTableWidget then the right choice?

    Any link would be greatly appreciated.
    Best regards
    Helmut Giese

  8. #8
    Join Date
    Feb 2008
    Posts
    98
    Thanks
    2
    Thanked 24 Times in 24 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Where to submit a bug?

    You can subclass QSortFilterProxyModel and reimplement lessThan().

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

    Default Re: Where to submit a bug?

    Quote Originally Posted by hgiese View Post
    @wysota I wonder: If there were an 'append' method, adding rows and sorting them would not step on each others feet - but such a method does not seem to exist.
    But it has nothing to do with having a method to append some data. The "problem" is that if you change the text in the table, it immediately gets resorted and the row will go elsewhere. To overcome it it is enough to hold a pointer to the item you are operating on and use this pointer to enter data.

    The example is simply very trivial with a single goal of proving some point. It's not a general purpose foul-proof and fool-proof full-blown framework for everything. If you fell into this trap it means that you probably don't fully understand what is going on in the framework. Otherwise you wouldn't have copied the example but instead would write the code from scratch to suit your needs.

    Another question (if I may): When sorting I want _all_ directories always shown before _any_ files so I need some kind of "custom sort". I wonder: Is a QTableWidget then the right choice?
    It's as right and as wrong choice as any other when it comes to sorting. When your application grows more complex you will probably have to switch to using QTableView with a real model.
    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.


  10. #10
    Join Date
    Sep 2009
    Posts
    13
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Where to submit a bug?

    Hi wysota,
    If you fell into this trap it means that you probably don't fully understand what is going on in the framework. Otherwise you wouldn't have copied the example but instead would write the code from scratch to suit your needs.
    spot on!
    Yes, I am completely new to Qt and a tool of such complexity imposes a - probably rather steep - learning curve. So one takes an example which _looks_ like it does something close to what one wants to achieve and then sort of stumbles forward.
    It's a bit of a catch-22: If I were familiar with Qt I wouldn't need the examples. Since I am not they are a helpful source of insight into the inner workings - but I am of course not yet in a position to really judge their suitability.
    Anyway, thanks a lot for your help. Let's close this thread since it's topic is rather misleading now.
    Best regards
    Helmut Giese

  11. #11
    Join Date
    Apr 2008
    Posts
    196
    Thanked 8 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    1

    Default Re: Where to submit a bug?

    If your are a commercial license holder you can use the Customer Portal

    Best Regards
    NoRulez

  12. #12
    Join Date
    Sep 2009
    Posts
    13
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Where to submit a bug?

    If your are a commercial license holder you can use the Customer Portal
    No, I'm just a poor guy ...

Similar Threads

  1. QWebView linkclicked and form submit
    By maddog_fr in forum Qt Programming
    Replies: 9
    Last Post: 8th August 2009, 20:03
  2. QSqlTableModel slow even with manual submit
    By pherthyl in forum Qt Programming
    Replies: 2
    Last Post: 15th October 2008, 20:40
  3. QODBC, QSqlTableModel, and submit problems
    By darkadept in forum Qt Programming
    Replies: 3
    Last Post: 18th May 2008, 12:46
  4. Replies: 3
    Last Post: 21st January 2008, 12:22

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.