Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // right+ctrl->refactor
- // Q_PROPERTY(QString example READ example WRITE setExample NOTIFY exampleChanged)
- public slots:
- void setExample(int example)
- {
- if (m_example == example)
- return;
- m_example = example;
- emit exampleChanged(m_example);
- }
- // Why not this ?
- void setExample(const int &example)
- {
- if (m_example != example){
- m_example = example;
- emit exampleChanged(m_example);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement