The Qt VS Tools allows programmers to create, build, debug and run Qt applications from within non-Express versions of Microsoft Visual Studio 2013 and later. The add-in contains project wizards, Qt project import/export support, integrated Qt resource manager and automated build setup for the Qt Meta-Object Compiler, User Interface Compiler, and Resource Compiler. Here's the documentation for current moc: Using the Meta-Object Compiler. The executable is located in the bin directory of your Qt installation (next to all the dlls). The executable is located in the bin directory of your Qt installation (next to all the dlls).
Contents
Installed Programs:assistant, designer, lconvert, linguist, lrelease, lupdate, moc, pixeltool, qcollectiongenerator, qdbuscpp2xml, qdbus, qdbusviewer, qdbusxml2cpp, qdoc, qhelpconverter, qhelpgenerator, qlalr, qmake, qmlbundle, qmleasing, qmlimportscanner, qmllint, qmlmin, qmlplugindump, qmlprofiler, qml, qmlscene, qmltestrunner, qmlviewer, qtdiag, qtpaths, rcc, syncqt.pl, uic, xmlpatterns, and xmlpatternsvalidator
Installed Libraries:libEnginio.so, libqgsttools_p.so, libQt5Bluetooth.so, libQt5Bootstrap.a, libQt5CLucene.so, libQt5Concurrent.so, libQt5Core.so, libQt5DBus.so, libQt5Declarative.so, libQt5DesignerComponents.so, libQt5Designer.so, libQt5Gui.so, libQt5Help.so, libQt5Location.so, libQt5MultimediaQuick_p.so, libQt5Multimedia.so, libQt5MultimediaWidgets.so, libQt5Network.so, libQt5Nfc.so, libQt5OpenGLExtensions.a, libQt5OpenGL.so, libQt5PlatformSupport.a, libQt5Positioning.so, libQt5PrintSupport.so, libQt5QmlDevTools.a, libQt5Qml.so, libQt5QuickParticles.so, libQt5Quick.so, libQt5QuickTest.so, libQt5QuickWidgets.so, libQt5Script.so, libQt5ScriptTools.so, libQt5Sensors.so, libQt5SerialPort.so, libQt5Sql.so, libQt5Svg.so, libQt5Test.so, libQt5UiTools.a, libQt5WebChannel.so, libQt5WebEngineCore.so, libQt5WebEngine.so, libQt5WebEngineWidgets.so, libQt5WebKit.so, libQt5WebKitWidgets.so, libQt5WebSockets.so, libQt5Widgets.so, libQt5X11Extras.so, libQt5XmlPatterns.so, libQt5Xml.so, and several plugins under /opt/qt5/{imports,plugins,qml}
Installed Directories:/usr/include/qt5, /usr/lib/qt5, /usr/share/doc/qt5, and /usr/share/qt5 OR /opt/qt5 and /opt/qt-5.10.1
Short Descriptions
assistant | is a tool for presenting on-line documentation. |
designer | is a full-fledged GUI builder. It includes powerful features such as preview mode, automatic widget layout, support for custom widgets, and an advanced property editor. |
lconvert | is part of Qt5's Linguist tool chain. It can be used as a standalone tool to convert and filter translation data files. |
linguist | provides support for translating applications into local languages. |
lrelease | is a simple command line tool. It reads a Qt project file and produces message files used by the application. |
lupdate | reads a Qt project file, finds the translatable strings in the specified source, header and Qt Designer interface files, and produces or updates the translation files listed in the project file. |
moc | generates Qt meta object support code. |
pixeltool | is a desktop magnifier and as you move your mouse around the screen it will show the magnified contents in its window. |
qcollectiongenerator | is a tool used to create a Qt Help Collection. |
qdbuscpp2xml | takes a C++ source file and generates a D-Bus XML definition of the interface. |
qdbus | lists available services, object paths, methods, signals, and properties of objects on a bus. |
qdbusviewer | is a graphical D-Bus browser. |
qdbusxml2cpp | is a tool that can be used to parse interface descriptions and produce static code representing those interfaces, |
qdoc | is a tool used by Qt Developers to generate documentation for software projects. |
qhelpconverter | is a tool used to convert files to Qt help format. |
qhelpgenerator | is a tool used to generate a Qt compressed help file. |
qlalr | is a tool used to generate code from grammar specifications. |
qmake | uses information stored in project files to determine what should go in the makefiles it generates. |
qmlbundle | is a tool used to manage QML bundle. |
qmleasing | is a tool used to define the easing curves using an interactive curve editor. |
qmlimportscanner | is a tool used to import QML files from a directory. |
qmllint | is a syntax checker for QML files. |
qmlmin | removes comments and layout characters from a QML file. |
qmlplugindump | is a tool to create a qmltypes file. |
qmlprofiler | is a tool used to analyze QML applications. |
qmlscene | is a utility that loads and displays QML documents even before the application is complete. |
qmltestrunner | is a tool used to make tests. |
qmlviewer | is a tool for loading QML documents that makes it easy to quickly develop and debug QML applications. |
qtdiag | is a tool for reporting diagnostic information about Qt and its environment. |
qtpaths | is a tool to query Qt path information. |
rcc | is a resource compiler used in conjunction with designer. |
syncqt.pl | is a script to create the forwarding headers in the include directories. It is an internal development tool. |
uic | is a Qt user interface compiler. |
xmlpatterns | provides support for XPath, XQuery, XSLT, and XML Schema validation. |
xmlpatternsvalidator | is a tool used to validate XML documents. |
Qt5 Tutorial Q_OBJECT Macro - 2018
bogotobogo.com site search:
The Q_OBJECT Macro is probably one of the weirdest things to whoever beginning to use Qt.
Qt QObject Class says:
The Q_OBJECT macro must appear in the private section of a class definition that declares its own signals and slots or that uses other services provided by Qt's meta-object system.
So, it sounds like we need it to use signal and slot, and probably for other purposes (meta-object related) as well.
Another doc related to moc explains:
The Meta-Object Compiler, moc, is the program that handles Qt's C++ extensions.
The moc tool reads a C++ header file. If it finds one or more class declarations that contain the Q_OBJECT macro, it produces a C++ source file containing the meta-object code for those classes. Among other things, meta-object code is required for the signals and slots mechanism, the run-time type information, and the dynamic property system.
Another doc on Signal and Slot:
All classes that contain signals or slots must mention Q_OBJECT at the top of their declaration. They must also derive (directly or indirectly) from QObject.
Note that when we want to make connection between signal and slot, we actually do it with Object scope:
- Quick answer: No.
- Better anser: Well, just put it there always.
Actually, the Q_OBJECT macro is only required if meta-object code has to be produced by the moc tool in order to use the signals and slots mechanism, the run-time type information, the dynamic property system and translating features for internationalization.
While it is possible to use QObject as a base class without the Q_OBJECT macro and without meta object code, neither signals and slots nor the other features described here will be available if the Q_OBJECT macro is not used.
In general, it seems that all Qt developers have been strongly recommend to use Q_Object for every subclass of QObject whether or not they actually use the features listed above.
Please enable JavaScript to view the comments powered by Disqus.