Differences between qputenv() and specifying env variables in kit
-
So in order to get the QTVK and my custom style for it working I had to put these two lines into main.cpp:
qputenv("QT_IM_MODULE", QByteArray("qtvirtualkeyboard")); qputenv("QT_VIRTUALKEYBOARD_STYLE", "KeyboardStyle");
now I want to pull them out of main.cpp and specify them in my kit so I set the base enviorment to "System Enviorment" and added:
QT_IM_MODULE
with a value ofqtvirtualkeyboard
and
QT_VIRTUALKEYBOARD_STYLE
with a value ofKeyboardStyle
however, this is not working; the keyboard still loads but my custom style is gone. What have I done incorrectly?
-
Hi,
Did you do that in the Run part of the project panel ?
-
I would have just added the two environment variables needed.
-
I may have misunderstood what you meant by "switched between the base environment to System Environment".
-
I may have misunderstood what you meant by "switched between the base environment to System Environment".
-
Which version of Qt Creator are you using ?
-
So in order to get the QTVK and my custom style for it working I had to put these two lines into main.cpp:
qputenv("QT_IM_MODULE", QByteArray("qtvirtualkeyboard")); qputenv("QT_VIRTUALKEYBOARD_STYLE", "KeyboardStyle");
now I want to pull them out of main.cpp and specify them in my kit so I set the base enviorment to "System Enviorment" and added:
QT_IM_MODULE
with a value ofqtvirtualkeyboard
and
QT_VIRTUALKEYBOARD_STYLE
with a value ofKeyboardStyle
however, this is not working; the keyboard still loads but my custom style is gone. What have I done incorrectly?
@circuits said in Differences between qputenv() and specifying env variables in kit:
now I want to pull them out of main.cpp and specify them in my kit so I set the base enviorment to "System Enviorment"
Are you aware that by removing the code from main.cpp you'll need to setup such environment variables yourself if when running your application on its own