I would like to know which language the application uses this moment (I mean to which directed: left-to-right or right-to-left). Is there a way to know it?
I would like to know which language the application uses this moment (I mean to which directed: left-to-right or right-to-left). Is there a way to know it?
Last edited by Mad Max; 12th January 2007 at 06:48. Reason: spelling error
try:
QApplication::layoutDirection() to get the enumeration describing this. Check the Class Documentation for QApplication for more on this.
Unfortunately this is for Qt4 only, but I need a solution for Qt3. Thanks for the answer none the less.
I found a solution. Perhaps it is slightly awry, but none the less it's works .
Qt Code:
qApp->installTranslator( translator );To copy to clipboard, switch view to plain text mode
Qt3 seems to offer this:
QApplication::reverseLayout()
http://doc.trolltech.com/3.3/qapplic...#reverseLayout
cheers
momesana
How about QApplication::reverseLayout()?
This method indicates current state. Unfortunately Qt does not set this flag automatically and each application should install the flag itself. The condition for the installation can be found only in the file of localization, reading a tag "QT_LAYOUT_DIRECTION". If you will look at qapplication.cpp then you can to see, how Trolls done this trouble themselves. They solved it by the same way .
Bookmarks