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
Related
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 should have asked this question before asking this
I am creating a QT app (on MAC) that should use frameworks compiled from qt-everywhere-opensource-src-5.5.1.tgz and not the one that comes with qt-opensource-mac-x64-clang-5.5.0.dmg.
I use QT creator installed by that DMG file and qmake in it somehow links with the frameworks installed by this DMG. (see this for more details)
Whats the legit way of making this QT creator use other framework.
Qt Creator has the concept of build Kits. A kit includes (among other things) a compiler, debugger and Qt version. In the Qt Creator preferences, go to the Build & Run section. Under the Qt Versions tab, ensure that your Qt 5.5.1 built from source is listed there. Then go to the Kits tab and either create a new kit or modify an existing one. Ensure that kit is using your Qt 5.5.1 version.
Once you've got that sorted out, a project can have one or more kits associated with it. From the main window, go to the Projects panel. Near the top of the Build & Run tab of the projects page will be the section where you select the kit(s) for the project. Ensure your project is using the kit you created/modified which uses your Qt 5.5.1. That should be enough to get your project building with your version of Qt instead of the one that comes with Qt Creator. To be absolutely sure, perhaps delete any previous build before you switch kits or even better, create a new build configuration in a new build/output directory for it.
I am using an independent version control management program (SmartGit) alongside Qt Creator, and I would prefer not to use Qt Creator for version control management.
It is becoming a nuisance that Qt always prompts me regarding whether I'd like to add new files to Git (when I add new files to the Qt Creator project), and whether I'd like to remove files from Git (when I remove files from the project).
Earlier today, I mistakenly added a file to Git through Qt Creator when adding a new file to the Qt Creator project. A few minutes later, I wished to temporarily remove the file from the project (likely to be re-added later). When I removed the file, Qt Creator dutifully asked me if I'd like to remove the file from version control - giving me a warning that the file might be removed permanently from the file system. Understanding the risk, I nonetheless decided to test the behavior and I said "yes, remove the file from Git as well as removing it from the project". Just as the warning forewarned, the file was removed from the file system and I then had to reconstruct it.
I could simply live with it and occasionally use Qt Creator's version control features in addition to SmartGit's, and/or I could use SmartGit directly to deal with any mistaken occasional uses ogreatf Qt Creator's version control features. However, I'd rather simply disable Qt Creator's version control features entirely, for convenience.
I looked through every Qt Creator option I could find in order to see if it is possible to disable Qt Creator's version control features (even if the project's files are under version control). Unfortunately, I cannot find an option to disable Qt Creator's version control features, anywhere. A careful Google search also revealed nothing.
Is it possible to disable Qt Creator's version control features, even if the project's files are under version control? If so, how is it done?
Help->About Plugins... and deselect the version control plugins.
Our application is localised and I have pulled in all the standard Qt_*.qm files as well so that my Qt dialogs are translated as much as possible.
However one of our distributors wants to add the Danish translation and its not in the standard Qt translation files.
How can I get Qt to create the file so I can send it off for translation?
There is some information about translation of Qt itself:
http://doc.trolltech.com/4.6/internationalization.html#produce-translations
it's said that templates for qt translation (*.ts files) should be in the ${QTDIR}/translations directory. I can't see them in my Qt4 installation from official Ubuntu repository but I think they should be included in distributions provided by Nokia on official download page.
Edit
Idea how to generate new empty *.ts file for qt itself can be found in translations/translations.pri directory of qt sources. For Qt 4.6.3 it will be
lupdate -locations relative -no-ui-lines -I../include -I../include/Qt corelib gui-ts ../qt_my.ts
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.