Qt Creator Crash With QWT Designer Plugin
-
Hi and welcome to devnet,
Did you got a complain about the use of multiple Qt version ?
-
I see this line
@QMessageLogger::fatal(char const*, ...) const + 161@Were would this be logged to? I now have a feeling that is where the answer will be.
-
You might get it on the console, try starting Qt Creator from the terminal
-
Maybe
@
QPixmap: Must construct a QGuiApplication before a QPixmap
@That was the only thing that popped out at me, but maybe there is something I am missing. Here is all the output:
@
~: ./Applications/Qt/Qt\ Creator.app/Contents/MacOS/Qt\ Creator
Info: creating stash file /Users/carloabelli/Documents/qt/build-Simulation-Desktop_Qt_5_2_1_clang_64bit-Debug/.qmake.stash
objc[49652]: Class NotificationReceiver is implemented in both /Users/carloabelli/Applications/Qt/Qt Creator.app/Contents/Frameworks/QtWidgets.framework/Versions/5/QtWidgets and /Users/carloabelli/Applications/Qt/5.2.1/clang_64/lib/QtWidgets.framework/Versions/5/QtWidgets. One of the two will be used. Which one is undefined.
objc[49652]: Class QCocoaPageLayoutDelegate is implemented in both /Users/carloabelli/Applications/Qt/Qt Creator.app/Contents/Frameworks/QtPrintSupport.framework/Versions/5/QtPrintSupport and /Users/carloabelli/Applications/Qt/5.2.1/clang_64/lib/QtPrintSupport.framework/Versions/5/QtPrintSupport. One of the two will be used. Which one is undefined.
objc[49652]: Class QCocoaPrintPanelDelegate is implemented in both /Users/carloabelli/Applications/Qt/Qt Creator.app/Contents/Frameworks/QtPrintSupport.framework/Versions/5/QtPrintSupport and /Users/carloabelli/Applications/Qt/5.2.1/clang_64/lib/QtPrintSupport.framework/Versions/5/QtPrintSupport. One of the two will be used. Which one is undefined.
QPixmap: Must construct a QGuiApplication before a QPixmap
zsh: abort ./Applications/Qt/Qt\ Creator.app/Contents/MacOS/Qt\ Creator
@ -
You qwt plugin doesn't use the same Qt as the one that comes with Qt Creator.
IIRC correctly when creating custom plugins you should also build Qt Creator yourself to ensure both uses the same Qt.
What you can try before that, is to use install_name_tool to point your qwt designer plugin to the Qt inside Qt Creator.
-
[quote author="SGaist" date="1396209488"]You qwt plugin doesn't use the same Qt as the one that comes with Qt Creator.
IIRC correctly when creating custom plugins you should also build Qt Creator yourself to ensure both uses the same Qt.
What you can try before that, is to use install_name_tool to point your qwt designer plugin to the Qt inside Qt Creator.[/quote]
Hi sgaist, Nice to see you in all Qt topics solving issues.
Long live!!! -
[quote author="ansifpi" date="1396773233"]
[quote author="SGaist" date="1396209488"]You qwt plugin doesn't use the same Qt as the one that comes with Qt Creator.IIRC correctly when creating custom plugins you should also build Qt Creator yourself to ensure both uses the same Qt.
What you can try before that, is to use install_name_tool to point your qwt designer plugin to the Qt inside Qt Creator.[/quote]
Hi sgaist, Nice to see you in all Qt topics solving issues.
Long live!!![/quote]Hi,
Thank you very much
-
I just wanted to say that I got my own Qt Designer plugin working with the 'stock' Qt Creator (simply downloaded from this site) using the install_name_tool.
So, I had my designer plugin working on Windows for a while before testing on OSX and the main thing to get it to work in the Qt Creator designer on Windows was to ensure that I used the 32 bit version of the Qt download (because I believe the packaged version of Qt Creator with all downloaded versions is 32-bit). I've not tried my dll with the 64-bit creator since, but 32-bit is fine for my little app.
The full application using my custom widget compiles and works fine in OSX, but I was having the same problems that you were using my own compiled .dylib files and the downloaded version of Qt Creator. Upon opening a .UI file in Designer Mode it would crash with the same error.
I fixed it (and I'm using my custom dylib designer plugin with the vanilla creator / designer) by doing the following;
-
Make sure you are compiling using the 'standard' compiler (and not C++ 11). I'm not 100% sure if this is required, but my spying with otool made me think it would be.
-
After running otool -L libMyLib.dylib, note down every line starting "/Users/<username>/Qt5.2.1/5.2.1/clang_64/". You will need to change it to a relative path using install_name_tool. I copied these paths from one of the designer plugins that came packaged with Qt Creator. Basically, my 'post-build' script to make my dylib work from within the Qt Creator bundle is...
@install_name_tool -change "/Users/johnwordsworth/Qt5.2.1/5.2.1/clang_64/lib/QtDesigner.framework/Versions/5/QtDesigner" "@loader_path/../../Frameworks/QtDesigner.framework/Versions/5/QtDesigner" libSFBWidgets.dylib
install_name_tool -change "/Users/johnwordsworth/Qt5.2.1/5.2.1/clang_64/lib/QtWidgets.framework/Versions/5/QtWidgets" "@loader_path/../../Frameworks/QtWidgets.framework/Versions/5/QtWidgets" libSFBWidgets.dylib
install_name_tool -change "/Users/johnwordsworth/Qt5.2.1/5.2.1/clang_64/lib/QtGui.framework/Versions/5/QtGui" "@loader_path/../../Frameworks/QtGui.framework/Versions/5/QtGui" libSFBWidgets.dylib
install_name_tool -change "/Users/johnwordsworth/Qt5.2.1/5.2.1/clang_64/lib/QtCore.framework/Versions/5/QtCore" "@loader_path/../../Frameworks/QtCore.framework/Versions/5/QtCore" libSFBWidgets.dylib
install_name_tool -change "/Users/johnwordsworth/Qt5.2.1/5.2.1/clang_64/lib/QtXml.framework/Versions/5/QtXml" "@loader_path/../../Frameworks/QtXml.framework/Versions/5/QtXml" libSFBWidgets.dylib
@Hope this helps!
-
-
I had the same problem. Here's how I got it working.
- download source code for qwt and Qt Creator
- build both with the suggested procedure using the same quake
- Open the Qt Creator package. There are several differences from the format shown in other posts. There is no /Contents/Framework folder, and the plugin folder is in /Contents/PlugIns.
- add the qwt plugin "libqwt_designer_plugin.dylib" to /Contents/PlugIns.
- using otool on the above dylib shows absolute paths to some qwt files. Don't change these. There is also a reference to qwt.framework without a path -- don't change that either.
- Add a symbolic link to the qwt.framework file in /Library/Frameworks. There is also an environment variable (DYLD_FRAMEWORK_PATH that can be used to set the path to frameworks, but I didn't try that).
-
Updating the library id to point it to the place where the file is not disallowed. However one must take care to update it if it's moved at some point