Results 1 to 1 of 1

Thread: setWritingSystem gives "out of range" error

  1. #1
    Join Date
    Apr 2009
    Location
    Valencia (Spain)
    Posts
    245
    Thanks
    38
    Thanked 19 Times in 19 Posts
    Qt products
    Qt4
    Platforms
    Symbian S60

    Default setWritingSystem gives "out of range" error

    Hi, I'm having problem when I try to add a filter.

    I have a QDialog which controls the font of a text, it has a QFontComboBox for the family, a QComboBox for the size and another for the writingSystem.

    I want to change the QFontComboBox, appling a filter, depending of which writingSystem is selected.

    It's a pretty clear code, and it gives an strage "out of range" problem when I execute.

    Qt Code:
    1. void CFontsDialog::combBWritSystemsChanged( QString strWrtSystems )
    2. {//strWrtSystems is the selected writingSystem in the comboBox
    3. QFontDatabase::WritingSystem auxWrSystem = ui.m_combBFamilies->writingSystem();
    4.  
    5. QFontDatabase database;
    6. QList<QFontDatabase::WritingSystem> lWrSys = database.writingSystems();
    7. for(int i = 0; i < lWrSys.size(); ++i)
    8. {
    9. if(QFontDatabase::writingSystemName(lWrSys.at(i)) == strWrtSystems)
    10. {
    11. auxWrSystem = lWrSys.at(i); //this line is always executed, the variable is valid
    12. break;
    13. }
    14. }
    15. ui.m_combBFamilies->setWritingSystem(auxWrSystem); //error, but the variable seems right :S
    16. }
    To copy to clipboard, switch view to plain text mode 

    any clue? thanks!
    Last edited by jano_alex_es; 2nd October 2009 at 12:02.

Similar Threads

  1. nmake error during .pro compiling
    By mattia in forum Installation and Deployment
    Replies: 5
    Last Post: 18th June 2008, 10:15
  2. Compile 4.4.0
    By LordQt in forum Installation and Deployment
    Replies: 18
    Last Post: 29th May 2008, 13:43
  3. Error compiling psql plugin
    By vieraci in forum Installation and Deployment
    Replies: 4
    Last Post: 7th October 2007, 02:49
  4. qt 4.2.2 install on aix
    By try to remember in forum Installation and Deployment
    Replies: 2
    Last Post: 28th March 2007, 12:19
  5. Qt-x11-commercial-src-4.2.0-snapshot-20060824 error
    By DevObject in forum Installation and Deployment
    Replies: 4
    Last Post: 24th August 2006, 23:31

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.