PDA

View Full Version : Qt project developed in Windows not working properly in Unix



aurora
8th February 2012, 05:56
I developed a Qt project in windows using Qt Creator 2.3.0
Based on Qt 4.7.4 (32 bit).....
I tried to buit the same project in Unix, which was using Qt 4.4.3... (i cant upgrade this..)
I got error for the following lines...


ui->tabWidget_unfiltered->setTabsClosable(true);




ui->lineEdit_directory->setText(path);




stringList.removeDuplicates();




when i removed those statements, it executed.....
Now what should i need to do...inorder to get all those features in Unix..

ChrisW67
8th February 2012, 06:09
Assuming that lineEdit_directory is a QLineEdit and path is a QString then this line is absolutely correct.

For the other two use a version of Qt that includes these features or code them yourself:

QStringList::removeDuplicates(): introduced in Qt 4.5 and easily replaced (look at the 4.7.4 code).
QTabBar::setTabsClosable() (also QTabWidget): introduced in Qt 4.5. Much work to replace.


You can, of course, build your own local copy of Qt 4.8 on the Linux box and deploy your application with the relevant libraries.