After last update (I'm using Manjaro GNU/Linux distribution) I am not able to see any pane when opening RStudio. Only the Toolbar and buttons with icons like that to open new or existent files, open folders, and save files are shown.
If I go to View -> Panes, and change options there, nothing seems to happen, or a tiny window is open where only apply and OK buttons are visible. If other options are selected, eg. File -> New File, a bunch of text appears for a short time and then disappears, but nothing is shown after that. Similarly, a message indicating RStudio window.program_mode = "desktop" appears momentarily when opening the application.
If RStudio is opened from the command line terminal, the following error messages appear:
Qt WebEngine resources not found at /share/qt/resources. Trying parent directory...
Qt WebEngine resources not found at /share/qt. Trying application directory...
Qt WebEngine resources not found at /usr/lib/qt/libexec. Trying fallback directory... The application MAY NOT work.
Path override failed for key base::DIR_QT_LIBRARY_DATA and path '/home/user/.QtWebEngineProcess'
Installed Qt WebEngine locales directory not found at location /share/qt/translations/qtwebengine_locales. Trying application directory...
Qt WebEngine locales directory not found at location /usr/lib/qt/libexec/qtwebengine_locales. Trying fallback directory... Translations MAY NOT not be correct.
Path override failed for key ui::DIR_LOCALES and path '/home/user/.QtWebEngineProcess'
[0101/102738.515189:ERROR:resource_bundle.cc(887)] Failed to load /home/user/.QtWebEngineProcess/qtwebengine_resources.pak
Some features may not be available.
[0101/102738.515234:ERROR:resource_bundle.cc(887)] Failed to load /home/user/.QtWebEngineProcess/qtwebengine_resources_100p.pak
Some features may not be available.
[0101/102738.515240:ERROR:resource_bundle.cc(887)] Failed to load /home/user/.QtWebEngineProcess/qtwebengine_resources_200p.pak
Some features may not be available.
[0101/102738.515965:WARNING:resource_bundle_qt.cpp(117)] locale_file_path.empty() for locale
Use of deprecated not thread-safe setter, use setUrlRequestInterceptor instead.
Use of deprecated not thread-safe setter, use setUrlRequestInterceptor instead.
"Invalid splitter position detected: 304/0"
So far, I've tried to reinstalling RStudio and qt, and deleting .rstudio-desktop/, but no luck, and I am not able to figure out what is going on. Any ideas?
I had the same issue on Arch and found this solution on the bug reports: https://bugs.archlinux.org/task/64973
It was solved by adding this /usr/lib/qt/libexec/qt.conf
[Paths]
Prefix = /usr/lib/qt
Data = /usr/share/qt
Translations = /usr/share/qt/translations
Hope it helps someone else.
Related
I have installed C:\Qt\5.6\ on Windows 10. I have started QtCreator from there, and opened C:\Qt\5.6\Src\qttools\qttools.pro in it. I expanded the node, and right-clicked on designer and did Build "designer", it built fine (using mingw)
Now, I try to do the same for windeployqt, but it fails with:
:-1: error: No rule to make target 'C:/Qt/5.6/mingw49_32/lib/libQt5Bootstrapd.a', needed by '..\..\bin\windeployqt.exe'. Stop.
What am I missing, and how can I get windeployqt to compile?
Ok, I think I got it. First, I tried looking for *bootstrap* named files in C:\Qt, and it turns out, this file exists:
C:\Qt\5.6\mingw49_32\lib\libQt5Bootstrap.a
So, the only difference from the filename in the error message, libQt5Bootstrapd.a, is that there isn't a d at the end of the filename (without the extension) - and then I remembered, that d probably represents a Debug version of the .a library.
As you can see on the screenshot, there is a button down left in the Qt Creator GUI, where it says "qttools ... (monitor icon) ... Debug". This is "Deploy Configuration" - I clicked there, and set the Deploy Configuration to "Release" - and then tried building windeployqt again - and this time, it worked without an error message.
I created file dialogs to select files within a Qt application. When migrating to Qt5 I encounter a regression, the file dialog is much poorer when linking against Qt5 rather than Qt4:
Qt4
Qt5
For example it is very hard for an user to navigate to the network mounted share directories.
The code is as simple as this:
QString path;
path = QFileDialog::getExistingDirectory(this, tr("Pick a file"));
QFileDialog::DontUseNativeDialog does not change anything.
My OS is Ubuntu 16.04, I have both nautilus (3.14.3) and nemo (2.8.7) installed. nemo is configured to be the default file manager:
xdg-mime default nemo.desktop inode/directory application/x-gnome-saved-search
Every other application seems to use the same dialog as the Qt4 file dialog screenshot.
How do I get the "old" file dialog in Qt5?
If I try with QT_QPA_PLATFORMTHEME= ./my_app then I get this:
The following works for me on Ubuntu 16.04 – it is more of a workaround than an actual solution, though:
Edit: First make sure that the package libqt5libqgtk2 is installed. It brings the GTK2 bindings for Qt5. If the package is not installed, the file choosers will look like the last screenshot shown in the question above.
Then, assuming you want to launch your application my_app from a terminal, launch it as follows (mind the space after =):
$ QT_QPA_PLATFORMTHEME= my_app
This is because, according to a bug report on launchpad, there seems to be a problem with the Ubuntu package appmenu-qt5: the package forces Qt5 dialogs to become non-native as a side effect of explicitly setting QT_QPA_PLATFORMTHEME=appmenu-qt5 via /etc/profile.d/appmenu-qt5.sh. Unsetting the platform theme via QT_QPA_PLATFORMTHEME= before launching your application changes this behavior locally.
Edit: When using the described approach, however, the global menu might not work in my_app.
I am new to Qt so I follow a tutorial on QML. It starts with a basic qml file which should be run with qmlviewer.
The problem is that when I start qmlviewer it says
qmlviewer: could not exec '/usr/lib/qt/bin/qmlviewer': No such file or directory
whereis qmlviewer tells me that it's location is /usr/bin/qmlviewer so I try to run it with this absolute path, but I still get the same error
qmlviewer: could not exec '/usr/lib/qt/bin/qmlviewer': No such file or directory
Why is it still looking for that location ? How can I solve this ?
I should mention that I have tried qtconfig just for testing, and I still get the error, so this is a global Qt problem.
Thank you
As said in the documentation : http://doc.qt.io/qt-5/qtquick-porting-qt5.html
The qmlviewer tool provided for prototyping and testing QML
applications in Qt 4.x has been replaced with the qmlscene tool which
integrates with the new scenegraph features in Qt 5.
So using qmlscence all works.
I am trying to set up Marble to work with Qt 5.5 on OSX. I'm not very experienced with the details of linking and such and I think that is causing the problem I am having.
Question: Did I screw up the 'marble` install or is this an easily solved linking issue?
Qt 5.5 is installed in my user directory (using Qt's network installer) on a system running OSX 10.9.5. It works fine. I followed the instructions on the Marble site to clone, build and install from source with (I believe) the appropriate Qt flags. That seemed to go without issue. When I try to build the simple test app listed here, the #include <marble/MarbleWidget.h> line gives a "file not found" error.
After the install I've ended up with the following:
A "marble" directory in my root user folder
A "Marble.app" file along with various other marble related files in the bin and include directories. However the Marble.app gives the following error on launch:
Dyld Error Message: Library not loaded:
#rpath/QtCore.framework/Versions/5/QtCore Referenced from:
/usr/local/Marble.app/Contents/MacOS/marble-qt Reason: image not
found
Binary Images:
0x7fff6a1f9000 - 0x7fff6a22c817 dyld (239.4) <7AD43B9B-5CEA-3C7E-9836-A06909F9CA56> /usr/lib/dyld
So a semi-solution: I used the Qt Creator "add Library" function and ended up with the following additions to the .pro file. I had to paste in the link to the lib since the dialog doesn't allow browsing of "usr/local/". Also, although I tried to link to the lib alias ("libmarblewidget-qt5.dylib"), the actual lib name is used.
macx: LIBS += -L$$PWD/../../../../../usr/local/lib/ -lmarblewidget-qt5.0.21.80
INCLUDEPATH += $$PWD/../../../../../usr/local/include
DEPENDPATH += $$PWD/../../../../../usr/local/include
I don't understand what this $$PWD/../../../../../ business is.
But it worked and I am able to run the example code at the link in my question.
I wish this install/build stuff wasn't so damned arcane. I've spent endless hours just trying to get things set up – really sucks the joy out of exploring this stuff and I can't say I really learned much of anything from it.
Update
So I cleaned out the "$$PWD" crap and the literal lib name and it works. Not sure what difference it makes – but there you go.
macx: LIBS += -L/usr/local/lib/ -lmarblewidget-qt5
INCLUDEPATH +=/usr/local/include
DEPENDPATH +=/usr/local/include
Either the build is faulty or you need a different version of Qt installed to run it. Usually the app has the Qt libraries that it needs wrapped up in the app itself. If it's not in there it will search your mac for it. The message says that QtCore can't be found in either place. If you look inside Google's Google Earth, you can see where the libraries are stored. You can also copy a version of QtCore into your Marble to see if it will work.
I want to setup Qt Creator (3.0) in a way, that I can debug into the Qt classes. So I download the corresponding src code (http://gitorious.org/qt/qt5) and install it in a directory (e.g. c:\Qt5\src).
Then I have my own project. Where do I need to set the source code path of Qt (c:\Qt5\src), so I can debug my code, but also into a Qt class where necessary.
-- Edit:Pavel's comment --
Pavel has given a good hint: But I am using a precompiled version of Qt/Qt Creator. So I am basically looking for a solution which does not require me to compile from source. Nevertheless a useful hint. Thanks.
If you are using a prebuilded version just remap the source code location as described in http://doc.qt.io/qtcreator/creator-debugger-engines.html
Mapping Source Paths
To enable the debugger to step into the code and display the source
code when using a copy of the source tree at a location different from
the one at which the libraries where built, map the source paths to
target paths:
Select Tools > Options > Debugger > General > Add.
In the Source path field, specify the source path in the debug information of the executable as reported by the debugger.
In the Target path field, specify the actual location of the source tree on the local machine.
To get "the source path in the debug information of the executable as reported by the debugger", you can activate the "Use Tooltips in Stack-View when Debugging" option by right-clicking in the Stack View and move the mouse over a specific function call.
If you look into the tooltips, you will see references to /Users/qt/work, the Mac deployed debug symbols are pointing there. Of course, this is not documented, as these folks want you to buy enterprise.
If you create the /Users/qt/work directory (as root), then make a soft link to your source directory named qt, everything will work. No need to build anything from source (under Mac that would result in tens of gigs wasted). Same considerations about plugins
Example:
sudo -s
mkdir /Users/qt
cd /Users/qt
mkdir work
cd work
ln -s /Users/your_user_name/Qt/your_qt_release/Src qt
Everything will work. Any source mapping failed here, so leave those alone.
Hope this helps
With Xcode, before you step into the Qt library the first time, enter the following command in the LLDB window:
settings set target.source-map /Users/qt/work/qt /path/to/Qt/5.10.1/Src
(Obviously you'll want to change the version number, as relevant).
But suppose Trolltech changes its build directory, what to do then? (Or, how did the community wiki that gave the /Users/qt/work/qt path find it?) You can guess what the path needs to be by editing /path/to/Qt/5.10.1/clang_64/lib/QtCore.framework.dSYM/Contents/Resources/DWARF/QtCore_debug (or any other Qt library) and searching for some paths. "/Users" seems like a good guess. About 2% into the library you'll start seeing sections with a lot of paths like:
../../include/QtCore/../../src/corelib/kernel^#../../include/QtCore
/../../src/corelib/tools^#global^#/Users/qt/work/qt/qtbase/src/corelib
/../../include/QtCore/../../src/corelib/arch^#/Applications/Xcode.app
/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/<etc>
Look for an absolute path that looks like it could be writable. (/Applications/... would not be a likely build path, for example)
In recent Qt creator (v 4.11) press button "Add Qt Sources"
in Tools > Options > Debugger > General
and select Qt sources file.
Qt5 should be installed by online installer with checked "Qt Debug Information files".
Follow the instructions from Qt here:
"In the run configuration, select Use debug version of frameworks."