Results 1 to 19 of 19

Thread: QTableView sort column with numbers very slow

  1. #1
    Join Date
    Jan 2012
    Location
    Canary Islands, Spain
    Posts
    86
    Thanks
    4
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default QTableView sort column with numbers very slow

    Hi, i'm trying to sort a QtableView's column containing numbers, using QSortFilterProxyModel::sort(), but is veeery slow. It's ok sorting strings, good speed, but horrible with numbers.
    Any way to solve this please?
    Thanks.

  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: QTableView sort column with numbers very slow

    Please show some code demonstrating the problem.
    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.


  3. #3
    Join Date
    Jan 2012
    Location
    Canary Islands, Spain
    Posts
    86
    Thanks
    4
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Re: QTableView sort column with numbers very slow

    Its a very simple code:

    First i connect the QTableView header to the slot:
    Qt Code:
    1. connect(gameView->horizontalHeader(), SIGNAL(sectionClicked(int)), this, SLOT(saveSortOrder(int)));
    To copy to clipboard, switch view to plain text mode 

    and this is the slot at this moment:
    Qt Code:
    1. void RetroGC::saveSortOrder(int ind) {
    2.  
    3. romProxy->sort(ind, Qt::AscendingOrder);
    4. // gameView->horizontalHeader()->setSortIndicatorShown(true);
    5. // QSettings sortSettings(QString("Data/SSettings/%1/%2.ini").arg(CurrType).arg(CurrID), QSettings::IniFormat);
    6. // sortSettings.setValue( "Sort/Col", ind );
    7. // sortSettings.setValue("Sort/Mode", gameView->horizontalHeader()->sortIndicatorOrder());
    8.  
    9. }
    To copy to clipboard, switch view to plain text mode 
    Takes about 5 seconds to sort a table with 1.864 rows.

    I've commented some lines for testing. I've tried gameView->sortByColum() and still slow.

    EDIT: Ok, after some testings, i've found the problem. Only some rows have a different value because the default value is 0. If i fill the rows with incrementing integers, 1, 2, 3 ,4 ,5... etc., the sort speed its amazing . So, here is the new question: Is there any way to fix this problem? Any way to ignore that rows with the 0 value in that cell?
    Last edited by aguayro; 13th December 2012 at 15:22.

  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: QTableView sort column with numbers very slow

    What is the source model of the proxy? How is its data() method implemented?
    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.


  5. #5
    Join Date
    Jan 2012
    Location
    Canary Islands, Spain
    Posts
    86
    Thanks
    4
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Re: QTableView sort column with numbers very slow

    The source model is a reimplemented QAbstractTableModel, beacuse i need lazy population for big (10.000+ rows) tables.

    Here is the full data() implementation:
    Qt Code:
    1. QVariant RomList::data(const QModelIndex &index, int role) const
    2. {
    3.  
    4. if (!index.isValid())
    5. return QVariant();
    6.  
    7. if (index.row() >= ROMs.size() || index.row() < 0)
    8. return QVariant();
    9.  
    10. if (role == Qt::SizeHintRole){
    11. if(index.column() == 2) {
    12. return QSize(86,16);
    13. }
    14. }
    15. if (role == Qt::TextAlignmentRole){
    16. if(index.column() == 3) {
    17. return Qt::AlignHCenter;
    18. }
    19.  
    20. if(index.column() == 4) {
    21. return Qt::AlignHCenter;
    22. }
    23. }
    24. if (role == Qt::DecorationRole) {
    25.  
    26. if(index.column() == 2) {
    27. QFileInfo ROMi(ROMs.at(index.row()));
    28. QSettings setDATA(QString("Data/ROMdata/%1/%2/%3.ini").arg(CurrentTipo).arg(CurrentSystem).arg(ROMi.completeBaseName()), QSettings::IniFormat);
    29. return QPixmap(QString("Skins/%1/System/icons/rate%2.png").arg(CurrentSkin).arg(setDATA.value( QString("%1/Rating").arg( ROMi.completeBaseName() )).toString()));
    30. }
    31. }
    32. if (role == Qt::DisplayRole) {
    33. if(index.column() == 0) {
    34. QFileInfo ROMi(ROMs.at(index.row()));
    35. return ROMi.completeBaseName();
    36. }
    37. if(index.column() == 2) {
    38. QFileInfo ROMi(ROMs.at(index.row()));
    39. QSettings setDATA(QString("Data/ROMdata/%1/%2/%3.ini").arg(CurrentTipo).arg(CurrentSystem).arg(ROMi.completeBaseName()), QSettings::IniFormat);
    40. if(!setDATA.value(QString("%1/Rating").arg( ROMi.completeBaseName() )).isNull()) {
    41. return setDATA.value( QString("%1/Rating").arg( ROMi.completeBaseName() )).toInt();
    42. } else return QVariant();
    43. }
    44. if(index.column() == 3) {
    45. QSettings SetEmu(QString("Data/Emulators/%2/%1.ini").arg(CurrentSystem).arg(CurrentTipo), QSettings::IniFormat);
    46. if(!SetEmu.value(QString("%1/Name").arg( SetEmu.value("DefaultEmulator/RGCID").toString()) ).toString().isEmpty()) {
    47. return SetEmu.value(QString("%1/Name").arg( SetEmu.value("DefaultEmulator/RGCID").toString()) ).toString();
    48. }
    49. }
    50. if(index.column() == 4) { // This is the column i'm sorting, all row's value is 0 if the game is not played, so there are a lot of "0" cells slowing the sort
    51.  
    52. QFileInfo ROMi(ROMs.at(index.row()));
    53. QSettings setDATA(QString("Data/ROMdata/%1/%2/%3.ini").arg(CurrentTipo).arg(CurrentSystem).arg(ROMi.completeBaseName()), QSettings::IniFormat);
    54. if(!setDATA.value(QString("%1/Played").arg( ROMi.completeBaseName() )).isNull()) {
    55. return setDATA.value(QString("%1/Played").arg(ROMi.completeBaseName())).toInt();
    56. } else {
    57.  
    58. return 0;
    59. }
    60. }
    61.  
    62. if(index.column() == 9) {
    63. return ROMs.at(index.row());
    64. }
    65.  
    66. }
    67. return QVariant();
    68. }
    To copy to clipboard, switch view to plain text mode 

  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: QTableView sort column with numbers very slow

    Your data() implementation is quite slow (because of creating and accessing the instance of QSettings), maybe that's what causes sorting to be slow since each item is being accessed multiple times and each time you're creating new QSettings instance. Maybe you should cache those values you can in the 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.


  7. The following user says thank you to wysota for this useful post:

    aguayro (13th December 2012)

  8. #7
    Join Date
    Jan 2012
    Location
    Canary Islands, Spain
    Posts
    86
    Thanks
    4
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Re: QTableView sort column with numbers very slow

    Ok, i'll try to read all the values, or add all values into the game list, with the names, like "Name;played;rating;etc", and use QString::section() instead of QSettings. Probably that will solve the proble, name sorting is very fast, where there is not any QSettings access.

    Thanks wysota, you are a life saver again.

  9. #8
    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: QTableView sort column with numbers very slow

    The most obvious improvement is to create the settings object just once and keep it opened as a member variable of the model. I can see you're always creating QSettings with the same parameters so keeping the settings object open will at least prevent it from being parsed at each call to data().
    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. #9
    Join Date
    Jan 2012
    Location
    Canary Islands, Spain
    Posts
    86
    Thanks
    4
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Re: QTableView sort column with numbers very slow

    I fixed the slow issue, but theres a new problem.
    My custom model has a reimplemented setData() :
    Qt Code:
    1. bool RomList::setData(const QModelIndex &index, const QVariant &value, int role) {
    2. if(index.isValid() && role == Qt::DisplayRole ) {
    3. if(index.column() == 4) {
    4. int row = index.row();
    5. QStringList tmp = ROMs.at(row).split(";");
    6. tmp.replace(4, QString::number(value.toInt()));
    7. ROMs.replace(row, tmp.join(";"));
    8. emit dataChanged(index, index);
    9. return true;
    10. } else {
    11. return false;
    12. }
    13. }
    14. return false;
    15. }
    To copy to clipboard, switch view to plain text mode 

    All the table data loads from ROMs QstringList, so if i change some cell of column 4, it will be updated, but only works with some cells, some works, some doesn't work, its trange.

    Here is the data change:
    Qt Code:
    1. void RetroGC::incPlayed(QString stipo, QString sid, int num, int row) {
    2. QSettings romList(QString("Data/ROMLists/%1/%2.rgl").arg(stipo).arg(sid), QSettings::IniFormat);
    3. QStringList tmp = romList.value(QString("ROMS/%1").arg(num)).toString().split(";");
    4.  
    5. qint32 xt = gameList->index(row, 4).data(Qt::DisplayRole).toInt();
    6. xt++;
    7. tmp.replace(4, QString::number(xt));
    8. romList.setValue(QString("ROMS/%1").arg(num), tmp.join(";"));
    9. gameList->setData( gameList->index(row, 4), xt, Qt::DisplayRole );
    10. }
    To copy to clipboard, switch view to plain text mode 


    i've been 2 hours stucked and investigating, but i can't find where is the problem.

  11. #10
    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: QTableView sort column with numbers very slow

    First of all handle EditRole in your setData implementation in addition to DisplayRole. Second of all I suggest you restructure your program. Make it never access any of the ROM data directly without the model. It's better to add methods to the model class that will perform operations on the data itself than to risk modifying the data outside the model. You could simply have a increaseColumn4(const QModelIndex&) method that would bump up the number in the model and emit dataChanged().
    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.


  12. #11
    Join Date
    Jan 2012
    Location
    Canary Islands, Spain
    Posts
    86
    Thanks
    4
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Re: QTableView sort column with numbers very slow

    But the user will not add nothing manually, all is done by the app, if i use EditRole it seems to nothing happens.
    Ok, i'll restructure all the model thing, so all the ROM data will only managed by the model, if i understood crrectly.

    thaks again, and sorry my for programming noobness. >.<

  13. #12
    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: QTableView sort column with numbers very slow

    Quote Originally Posted by aguayro View Post
    But the user will not add nothing manually, all is done by the app, if i use EditRole it seems to nothing happens.
    It's just for completeness and to be safe in case you want to interact with one of many other mechanisms in Qt where distinction between DisplayRole and EditRole does matter.

    Ok, i'll restructure all the model thing, so all the ROM data will only managed by the model, if i understood crrectly.
    That should help you pinpoint the real problem. If you make sure you only access the data through the model (emitting appropriate signals along the way), problems with model aspects working "sometimes" should go away.

    thaks again, and sorry my for programming noobness. >.<
    No problem. Been there, done that
    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.


  14. #13
    Join Date
    Jan 2012
    Location
    Canary Islands, Spain
    Posts
    86
    Thanks
    4
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Re: QTableView sort column with numbers very slow

    The problem was in QSortFilterProxyModel and sorting, when i sort, the index are different from the source model. Trying to find the solution myself.

  15. #14
    Join Date
    Jan 2012
    Location
    Canary Islands, Spain
    Posts
    86
    Thanks
    4
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Re: QTableView sort column with numbers very slow

    It's strange, but the table still has sorting speed problems, whe all columns values are setted, i can take 5 seconds to sort by column. There is not ini access in the model.
    Where could be the problem? i'm using a QSortFilterProxyModel too.

    I really need solve the QTableView problems, its the central widget of my app, and can't have a good perfomance with 8000+ rows. I've seen an app that make all this REALLY instantly (coded in Delphi), i need to have that perfomance, if not, my app becomes useless in comparission .
    This table is going to kill me

    Here is my data implementation just now (note i've commented the DecorativeRole part to check if that helps to speed, but no luck, still slow):

    Qt Code:
    1. QVariant rs_GameModel::data(const QModelIndex &index, int role) const { // DATA
    2. if (!index.isValid()) {
    3. return QVariant();
    4. }
    5. if (index.row() >= romCount || index.row() < 0 ) {
    6. return QVariant();
    7. }
    8.  
    9. if (role == Qt::TextAlignmentRole) {
    10. if (index.column() > 0 && index.column() < 10) {
    11. return Qt::AlignHCenter;
    12. }
    13.  
    14. }
    15. if (role == Qt::UserRole) {
    16. if (index.column() == 0) {
    17.  
    18. return QString("%1;%2;%3").arg(ROMs.at(index.row()).section(";", 12, 12)).arg(ROMs.at(index.row()).section(";", 14, 14)).arg(ROMs.at(index.row()).section(";", 15, 15));
    19. }
    20. if (index.column() == 1) {
    21. return ROMs.at(index.row()).section(";", 1, 1);
    22. }
    23. if (index.column() == 2) {
    24. return ROMs.at(index.row()).section(";", 2, 2);
    25. }
    26. if (index.column() == 3) {
    27. return ROMs.at(index.row()).section(";", 11, 11);
    28. }
    29. }
    30. // if (role == Qt::DecorationRole) {
    31. // if (index.column() == 0) {
    32. // return romicon;
    33. // }
    34. // if (index.column() == 1) {
    35. // QString tmpExt = ROMs.at(index.row()).section(";", 1, 1);
    36.  
    37. // if (tmpExt.compare("zip", Qt::CaseInsensitive) == 0 || tmpExt.compare("7Z", Qt::CaseInsensitive) == 0 || tmpExt.compare("r", Qt::CaseInsensitive) == 0 ) {
    38. // return QIcon(QString("Skin/%1/icons/sys/compressed16.png").arg(CurrSkin));
    39. // } else if (tmpExt.compare("iso", Qt::CaseInsensitive) == 0 || tmpExt.compare("cue", Qt::CaseInsensitive) == 0 || tmpExt.compare("bin", Qt::CaseInsensitive) == 0 ||
    40. // tmpExt.compare("nrg", Qt::CaseInsensitive) == 0 || tmpExt.compare("mdf", Qt::CaseInsensitive) == 0 || tmpExt.compare("mds", Qt::CaseInsensitive) == 0 ) {
    41. // return QIcon(QString("Skin/%1/icons/sys/cddvd16.png").arg(CurrSkin));
    42. // } else {
    43. // return QIcon(QString("Skin/%1/icons/sys/cartridge16.png").arg(CurrSkin));
    44. // }
    45. // }
    46.  
    47. // if (index.column() == 2) {
    48. // if (ROMs.at(index.row()).section(";", 2, 2).toInt() != 0) {
    49. // return QPixmap(QString("Skin/%1/icons/sys/rate%2.png").arg(CurrSkin).arg(ROMs.at(index.row()).section(";", 2, 2).toInt()));
    50. // }
    51. // }
    52. // }
    53. if (role == Qt::DisplayRole) {
    54. if (index.column() == 0) {
    55. return ROMs.at(index.row()).section(";", 0, 0);
    56. }
    57.  
    58. if (index.column() == 3) {
    59. if (ROMs.at(index.row()).section(";", 3,3) == "rsnull") {
    60. return cEmulator;
    61. } else {
    62. return ROMs.at(index.row()).section(";", 3,3); }
    63. }
    64. if (index.column() == 4) {
    65. return ROMs.at(index.row()).section(";", 4, 4);
    66. }
    67. if (index.column() == 5) {
    68.  
    69. return ROMs.at(index.row()).section(";", 5, 5).replace("rsnull", "");
    70.  
    71. }
    72. if (index.column() == 6 ) {
    73. return ROMs.at(index.row()).section(";", 6, 6);
    74. }
    75. if (index.column() == 7) { // Compañia
    76.  
    77. return ROMs.at(index.row()).section(";", 7, 7);
    78.  
    79. }
    80. if (index.column() == 8) {
    81.  
    82. return ROMs.at(index.row()).section(";", 8, 8);
    83.  
    84. }
    85. if (index.column() == 9) {
    86.  
    87. return ROMs.at(index.row()).section(";", 9, 9);
    88.  
    89. }
    90. if (index.column() == 11) {
    91. return ROMs.at(index.row()).section(";", 10, 10);
    92. }
    93.  
    94. }
    95.  
    96. return QVariant();
    97. }
    To copy to clipboard, switch view to plain text mode 

    any help, clue, or anything is appreciated, anything that can help me to put end my QTableHell
    thanks
    Always trying to learn >.<

  16. #15
    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: QTableView sort column with numbers very slow

    Did you try profiling your app? Instead of chasing ghosts, it will tell you which parts of your program take most time to execute.

    What does this section() do?
    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.


  17. #16
    Join Date
    Jan 2012
    Location
    Canary Islands, Spain
    Posts
    86
    Thanks
    4
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Re: QTableView sort column with numbers very slow

    the list of games is a QStringList like name;language;path;etc... so i use section() to get each column data.

    About profiling i'm not sure what it means, i'll google for it (i'm newbie in programming in general)
    I'll try anything, this problem is killing me. Maybe Qt can't sort 15.000 rows in < 1 second?

    EDIT: i did it (at leas that seems), the problem was the section()
    Last edited by aguayro; 18th January 2013 at 03:15.
    Always trying to learn >.<

  18. #17
    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: QTableView sort column with numbers very slow

    How did you solve it?
    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.


  19. #18
    Join Date
    Jan 2012
    Location
    Canary Islands, Spain
    Posts
    86
    Thanks
    4
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Re: QTableView sort column with numbers very slow

    My model was working wit a QStringList, each QString was a row, Name;Type;Company;etc... then i was using section() to get the data for each row cell. I've replaced the QStringList with QList<QStrngList>, i didn't know that section() were too slow, but with QList<QStringList> and using just MyListQSList.at(index.row()).at( column-nuber ) is very fast, just instantly:

    Qt Code:
    1. QVariant rs_GameModel::data(const QModelIndex &index, int role) const { //////////////////////////////////////////////////////////// DATA
    2. if (!index.isValid()) {
    3. return QVariant();
    4. }
    5. if (index.row() >= romCount || index.row() < 0 ) {
    6. return QVariant();
    7. }
    8.  
    9. if (role == Qt::TextAlignmentRole) {
    10. if (index.column() > 0 && index.column() < 10) {
    11. return Qt::AlignHCenter;
    12. }
    13.  
    14. }
    15. if (role == Qt::UserRole) {
    16. if (index.column() == 0) {
    17. return QString("%1;%2;%3").arg(ROMs.at(index.row()).at(12)).arg(ROMs.at(index.row()).at(14)).arg(ROMs.at(index.row()).at(15));
    18. }
    19. if (index.column() == 3) {
    20. ROMs.at(index.row()).at(11);
    21. }
    22.  
    23. }
    24. if (role == Qt::DecorationRole) {
    25. if (index.column() == 0) {
    26. return romicon;
    27. }
    28. if (index.column() == 2) {
    29. return QPixmap(QString("Skin/%1/icons/sys/rate%1.png").arg(CurrSkin));
    30. }
    31.  
    32. }
    33. if (role == Qt::DisplayRole) {
    34. if (index.column() == 0) {
    35. return ROMs.at(index.row()).at(0);
    36. }
    37. if (index.column() == 3) {
    38. if (ROMs.at(index.row()).at(3) != "rsnull") {
    39. return ROMs.at(index.row()).at(3);
    40. } else {
    41. return cEmulator;
    42. }
    43. }
    44. if (index.column() == 4) {
    45. return ROMs.at(index.row()).at(4);
    46. }
    47. if (index.column() == 5) {
    48. return ROMs.at(index.row()).at(5);
    49. }
    50. if (index.column() == 6) {
    51. return ROMs.at(index.row()).at(6);
    52. }
    53. if (index.column() == 7) {
    54. return ROMs.at(index.row()).at(7);
    55. }
    56. if (index.column() == 8) {
    57. return ROMs.at(index.row()).at(8);
    58. }
    59. if (index.column() == 9) {
    60. return ROMs.at(index.row()).at(9);
    61. }
    62. if (index.column() == 11) {
    63. return ROMs.at(index.row()).at(10);
    64. }
    65.  
    66. }
    67.  
    68. return QVariant();
    69. }
    To copy to clipboard, switch view to plain text mode 

    I suposse will discover what is fast and what is slow in qt with the time, and programmng wit it
    Always trying to learn >.<

  20. #19
    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: QTableView sort column with numbers very slow

    Qt has nothing to do so. In every language search string section will take longer than getting the item from list or array.

Similar Threads

  1. How to sort QListWidget by numbers...
    By Patrick Sorcery in forum Newbie
    Replies: 7
    Last Post: 6th November 2017, 18:39
  2. How does the QTableWidget sort a column?
    By codemonkey in forum Qt Programming
    Replies: 1
    Last Post: 4th October 2009, 13:21
  3. how to SORT table of numbers with QT
    By tommy in forum Qt Programming
    Replies: 4
    Last Post: 29th May 2009, 09:34
  4. Replies: 2
    Last Post: 20th August 2008, 15:55
  5. Column with numbers
    By ederbs in forum Qt Programming
    Replies: 1
    Last Post: 29th November 2006, 22: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.