Important: Please read the Qt Code of Conduct -

Follow up question about Qt virtualKeyboard styles and import paths

  • If you look at this forum post you will see I recently discovered how to bring styles into my project. I was curious so I tried altering virtualkeyboard_default_style.qrc qresource prefix from: "/QtQuick/VirtualKeyboard/content/styles/test" too "/test". I then tried altering the file structure in my program from: NewFolder/QtQuick/VirtualKeyboard/content/styles/test too NewFolder/test. This does not seem to be working and I am left wondering why that might be?

  • After some testing I have discovered that I can decease this directory structure; however, in virtualkeyboard_default_style.qrc the qresource prefix must stay: "/QtQuick/VirtualKeyboard/content/styles/test" for some reason. So apparently this qresource prefix is NOT what dictates the file structure you must follow. In fact, if you simply copy the style directory into your project (test in this case) you don't need to use the:


    import statement and can instead just get away with the one liner:

    qputenv("QT_VIRTUALKEYBOARD_STYLE", "test");

    while I am still not sure why the qresource prefix must contain the "QtQuick/VirtualKeyboard/content/styles" directory path I am going to go ahead and mark this topic as solved.

Log in to reply