#include <QtGui/QApplication>
#include <QComboBox>
int main(int argc, char *argv[])
{
cb.setLayoutDirection( Qt::RightToLeft );
cb.addItem( "Abc" );
cb.addItem( "Abc (Abc)" );
cb.addItem( "(Abc)" );
cb.addItem( "(Abc) Abc" );
cb.addItem( "()" );
cb.addItem( "a (a) a" );
cb.show();
return a.exec();
}
#include <QtGui/QApplication>
#include <QComboBox>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QComboBox cb;
cb.setLayoutDirection( Qt::RightToLeft );
cb.addItem( "Abc" );
cb.addItem( "Abc (Abc)" );
cb.addItem( "(Abc)" );
cb.addItem( "(Abc) Abc" );
cb.addItem( "()" );
cb.addItem( "a (a) a" );
cb.show();
return a.exec();
}
To copy to clipboard, switch view to plain text mode
Create an empty Qt Gui application project and run the code above.
Note that if the braces are positioned in ends of the text (in a combobox item) the braces are somehow messed up.
Is this a QComboBox bug?
Searched the forum for a similar problem but found nothing.
Bookmarks