-
Notifications
You must be signed in to change notification settings - Fork 409
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
qt.conf causes graphics issues with Qt Quick Application on Ubuntu 16.04 #280
Comments
I've never used qt.conf files before, but I just noticed that there's one in my Qt build:
|
I got an idea from alamminsalo/orion#48 to check with
I dunno if this is the same problem, but just to highlight the relevant part from that:
|
I don't understand what the issue is. "The ripple effects are all over" = ? |
The ripple effects (of Qt Quick Controls 2's Material Style) are completely misplaced and the wrong size. I know it's a weird symptom of the issue, but it's not the only one: the shader in the colour picker is completely white. It could be something to do with the scenegraph or Qt Graphical Effects. All I know is, it runs fine if I remove the qt.conf. I've never run into this issue until the qt.conf was there. |
Do you observe the same if you run it on a system without Qt installed? |
I haven't tried that. I assume you mean with no Qt libraries at all, even system ones? Not sure that's an experiment I want to try, given my limited Linux knowledge. :) I have renamed the Qt build directory though (to ensure that it wasn't still referring to libraries there), and yes, it's the same behaviour. |
Yes, I am interested in what happens if you run on a system that has no system Qt. E.g., a live ISO of Xubuntu. |
Sorry, but that's more work than I'm currently willing to invest into this. I ended up just building statically. Slate is available to be cloned if you want to try to reproduce it. |
Just to add more info to this, I'm now pretty certain that this type of graphical issue is caused by the Qt XCB integration plugin not being imported properly: https://bugreports.qt.io/browse/QBS-1409 Maybe the qt.conf file is perhaps not pointing to the correct place or something? I dunno. For reference, this was the qt.conf file, taken from here:
|
After switching to Qbs (and building statically to avoid [1]), we ran into [2]. We now have a workaround for that, so we can finally release on Linux again. Closes #71. [1] probonopd/linuxdeployqt#280 [2] https://bugreports.qt.io/browse/QBS-1409
@mitchcurtis thanks for the pointer. What do you mean by "Qt XCB integration plugin not being imported properly"? I assumed that either it gets loaded (then the application runs) or doesn't get loaded (in which case the app refuses to run). Am I wrong? |
In the case of the linked bug report, the plugin was imported:
but it wasn't being loaded I think? So "imported" might have been the wrong choice of word... whatever this does in Qbs is what was missing: In both cases (Qbs and linuxdeployqt), the application runs for some reason, but refuses to display certain items that use shaders, it seems. |
From the documentation, it seems like the http://doc.qt.io/qt-5/qtplugin.html#Q_IMPORT_PLUGIN says:
Looking at the code, it just creates an instance of the plugin. So that seems to suggest that it was the linking that was missing, but I'm not sure why it results in the graphical issues and not some error. |
My Qt skills are nowhere good enough to make sense of this. We need a Qt expert here. |
It seems when you deploy, the target system uses the platform's Qt libs, not the ones you bundled with the binary. You need to build your app with an rpath that points to the lib subdirectory in the executable's directory. You can use $ORIGIN for this:
Libraries will now be loaded from the |
Awesome, thanks @realnc! I'll have to give that a try sometime. I guess that would be https://doc.qt.io/qbs/qml-qbsmodules-cpp.html#rpaths-prop I'll close this on the assumption that that fixes it, and will reopen if it doesn't. |
linuxdeployqt should automatically set the rpath for you; please open an issue there if it doesn't. |
After switching to Qbs (and building statically to avoid [1]), we ran into [2]. We now have a workaround for that, so we can finally release on Linux again. Closes #71. [1] probonopd/linuxdeployqt#280 [2] https://bugreports.qt.io/browse/QBS-1409
Originally I thought this was a Qt bug, so a lot of the details are all there:
https://bugreports.qt.io/browse/QTBUG-67429
For more context, the commands I used:
export PATH=/home/mitch/dev/qt5.11-release/qtbase/bin:$PATH
~/Downloads/linuxdeployqt-continuous-x86_64.AppImage ~/dev/slate-qt5_11_release-Release-copy/app/slate -qmldir=/home/mitch/dev/slate/app/qml
find /home/mitch/dev/slate-qt5_11_release-Release-copy \( -name "moc_*" -or -name "*.o" -or -name "qrc_*" -or -name "Makefile*" -or -name "*.a" -or -name "uic_wrapper.sh" \) -exec rm {} \;
I spent a while removing code, and at some point I indirectly fixed the issue by changing the build directory in Creator. When I then started looking for possible causes for this in the original build directory, I noticed the qt.conf file. Removing it doesn't fix the issue, because then I get
after renaming my Qt build. The platform plugin is there though:
Deleting the contents of the qt.conf file doesn't help either.
The text was updated successfully, but these errors were encountered: