Reader small image

You're reading from  Mastering Qt 5 - Second Edition

Product typeBook
Published inAug 2018
Reading LevelIntermediate
PublisherPackt
ISBN-139781788995399
Edition2nd Edition
Languages
Tools
Right arrow
Authors (2):
Guillaume Lazar
Guillaume Lazar
author image
Guillaume Lazar

Guillaume Lazar is a software engineer living in France, near Paris. He has worked in different companies, from start-ups to multinationals, for the last 10 years. He took the opportunity to observe and learn many team organizations and technologies. In 2014, he founded his own software development company at the age of 27. The current hierarchical organization that applies to most companies seems obsolete to him. With his own company, he wants to try a different approach. Although he defines himself as a Qt framework lover, he likes to mix different technologies and platforms. He also spends time on game development, machine learning, and electronics, because "things" become "alive".
Read more about Guillaume Lazar

Robin Penea
Robin Penea
author image
Robin Penea

Robin Penea has been working in the software industry for a more than a decade. He worked in start-ups and large companies with many technologies that ranged from embedded software to web development. Armed with this experience, he wrote the Mastering Qt 5 book to spread what he loves the most about the programming craft: proper design and quality code. The teaching bug has bitten him, and he continues to share what he learned online using videos. When he is not tinkering with some new technology, he is either on a wall, rock-climbing, or playing music on his piano. You can reach him via Twitter @synapticrob.
Read more about Robin Penea

View More author details
Right arrow

Exposing your plugin to Qt Designer

The FilterWidget class is completed and ready to be used. We now have to register the FilterWidget class with the Qt Designer plugin system. This glue code is made using a child class of QDesignerCustomWidgetInterface.

Create a new C++ class named FilterPluginDesigner and update FilterPluginDesigner.h as shown in the following code:

#include <QDesignerCustomWidgetInterface> 
 
class  FilterPluginDesigner : public QObject, public QDesignerCustomWidgetInterface 
{ 
    Q_OBJECT 
    Q_PLUGIN_METADATA(IID 
        "org.masteringqt.imagefilter.FilterWidgetPluginInterface") 
    Q_INTERFACES(QDesignerCustomWidgetInterface) 
public: 
    FilterPluginDesigner(QObject* parent = 0); 
}; 

The FilterPlugin class inherits from two classes:

  • The QObject class, to rely on the Qt parenting system
  • The QDesignerCustomWidgetInterface class, to...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Mastering Qt 5 - Second Edition
Published in: Aug 2018Publisher: PacktISBN-13: 9781788995399

Authors (2)

author image
Guillaume Lazar

Guillaume Lazar is a software engineer living in France, near Paris. He has worked in different companies, from start-ups to multinationals, for the last 10 years. He took the opportunity to observe and learn many team organizations and technologies. In 2014, he founded his own software development company at the age of 27. The current hierarchical organization that applies to most companies seems obsolete to him. With his own company, he wants to try a different approach. Although he defines himself as a Qt framework lover, he likes to mix different technologies and platforms. He also spends time on game development, machine learning, and electronics, because "things" become "alive".
Read more about Guillaume Lazar

author image
Robin Penea

Robin Penea has been working in the software industry for a more than a decade. He worked in start-ups and large companies with many technologies that ranged from embedded software to web development. Armed with this experience, he wrote the Mastering Qt 5 book to spread what he loves the most about the programming craft: proper design and quality code. The teaching bug has bitten him, and he continues to share what he learned online using videos. When he is not tinkering with some new technology, he is either on a wall, rock-climbing, or playing music on his piano. You can reach him via Twitter @synapticrob.
Read more about Robin Penea