Solved 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 ?
-
@sgaist Yeah I went too Run and under Run Environment I switched the base environment to System Environment, was that incorrect?
-
I would have just added the two environment variables needed.
-
@sgaist Isn't that what I did?
-
I may have misunderstood what you meant by "switched between the base environment to System Environment".
-
@sgaist Oh well under Run Environment there is a drop down box that has these options:
System Environment
Build Environment
Clean EnvironmentOf the three I chose System Environment.
-
Which version of Qt Creator are you using ?
-
@sgaist I am not sure what I did... I am pretty darn sure I had already tried rebuilding the application but apparently not because I ran a full build and now it works fine... sorry for wasting your time.
-
@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