I create a custom widget project with a qled. Now, i want to use it on my project but i can't find the correct way to install this custom widget in the qtcreator. Can you help me?
Related
I cloned mapboxgl from Github. I followed the steps.
https://github.com/mapbox/mapbox-gl-native/tree/master/platform/qt
The map running when I enter the make run-qt-app command on mapbox-gl-native directory. But I would like to include the offline map on my qml application to implement via qt creator.
How can I do it? Could you help me?
That repository contains code for the Qt bindings and should not be used directly.
Use the "mapboxgl" plugin available since Qt 5.9. There you can specify the path for the offline database:
https://doc-snapshots.qt.io/qt5-5.9/location-plugin-mapboxgl.html#optional-plugin-parameters
Qt Designer and Qt Creator when trying to edit ui files have started to crash recently. I've found it's because of KDE widget plugins that are built for a previous version. However, I can't find a way to disable them. Is there a way to do this?
For Qt Designer, there is a config option that allows you to disable specific plugins. Exactly how you do this may differ for each platform, but on my Arch Linux system I have the following config files:
Qt5: $HOME/.config/QtProject/Designer.conf
Qt4: $HOME/.config/Trolltech/Designer.conf
And in the Qt5 file, I have disabled all the KDE plugins by adding a section like this:
[PluginManager]
DisabledPlugins=/usr/lib/qt/plugins/designer/kdewebkit5widgets.so, /usr/lib/qt/plugins/designer/kf5deprecatedwidgets.so, /usr/lib/qt/plugins/designer/kf5widgets.so
So it's just a matter of adding the full path of any plugin you want to disable to a comma-separated list.
I don't use Qt Creator, but if the above doesn't work, I understand it may also be possible to disable plugins via Help -> About Plugins.
I downloaded a very useful widget for my applications. A LED indicator from http://qt-apps.org/content/show.php/QLedIndicator?content=118610
But there is no README file or any instruction files.
I unzip it and gave qmake QLedIndicator.pro and then make it compiled well without errors.
But I have no idea how to add the widget in Qt Designer, so I can drag and drop it where I need.
I'm using qt 4.8.3 with mingw. qt creator 2.6.0
Under Linux you just need to copy the file libQLedIndicatorPlugin.so in the
/usr/lib/qt/plugins/designer/
directory (or whatever is the directory on your distro).
Under Windows the process is similar, but you need to pay attention to the building process, as explained on the bottom of the page I linked
Qt's plugin architecture allows you to add custom widget to the designer. You can check out this official qt's link to do so - http://doc.qt.digia.com/4.7/designer-customwidgetplugin.html
I have created a widget, MyWidget, and a QtDesigner plugin for MyWidget. Now I want to use MyWidget in bigger project, MyProject. I created a ui file for MyProject with QtDesigner and add a MyWidget in the designer. Now when I try to compile MyProject, I get "error: can't find MyWidget.h". Is there any way to automatically pull in dependencies from qtdesigner plugins? Or would I have to manually copy MyWidget.h/cpp into the MyProject directory?
I created a custom widget by following the instructions provided in Qt Creator's help. I followed everything exactly as they said there. My widget isn't showing up with the other widgets. I even tried their WorldTimeClock example. That doesn't show in the Qt Designer either.
How can I debug this?
If you go to Tools -> Form Editor -> About Qt Designer plugins, you will find a list of loaded qt plugins, and you will see an error message next to the ones that failed to load. I think that's the best you can get.
I just encountered this situation. From what I could find, the distributed version of Qt Creator was compiled with msvc, not mingw. Try opening Qt Designer. Do you see your (and the built-in) custom widgets? If so, follow the instructions here to build Qt Creator with mingw. When I did this, my custom widgets appeared in the new build.