whitefurrows
23rd September 2009, 10:02
Hi,
i use this Example (http://wiki.qtcentre.org/index.php?title=Dynamic_translation_in_Qt4_applica tions) for dynamic translation.
How can i verify if my applicatin begin and end translating? I have try to send a signal:
application.h
class Application : public QApplication
{
Q_OBJECT
public:
explicit Application(int& argc, char* argv[]);
~Application();
//...
public slots:
static void setLanguage(const QString& locale);
// ...
signals:
static void languageChanging(int);
};
application.cpp
void Application::setLanguage(const QString& locale)
{
emit languageChanging(true);
// remove previous
if (current)
{
removeTranslator(current);
}
// install new
current = translators.value(locale, 0);
if (current)
{
installTranslator(current);
}
emit languageChanging(false);
}
but my compiler say error ... : static member functions do not have 'this' pointers
and i think thats OK but what can i do?
i use this Example (http://wiki.qtcentre.org/index.php?title=Dynamic_translation_in_Qt4_applica tions) for dynamic translation.
How can i verify if my applicatin begin and end translating? I have try to send a signal:
application.h
class Application : public QApplication
{
Q_OBJECT
public:
explicit Application(int& argc, char* argv[]);
~Application();
//...
public slots:
static void setLanguage(const QString& locale);
// ...
signals:
static void languageChanging(int);
};
application.cpp
void Application::setLanguage(const QString& locale)
{
emit languageChanging(true);
// remove previous
if (current)
{
removeTranslator(current);
}
// install new
current = translators.value(locale, 0);
if (current)
{
installTranslator(current);
}
emit languageChanging(false);
}
but my compiler say error ... : static member functions do not have 'this' pointers
and i think thats OK but what can i do?