fluent connection for ButtonGadget
parent
a052134503
commit
ca5c31e639
|
@ -34,6 +34,8 @@ namespace Xybrid::UI {
|
|||
inline ButtonGadget* setSize(qreal w, qreal h = 24) { size = {w, h}; update(); return this; }
|
||||
inline ButtonGadget* setText(const QString& t) { text = t; update(); return this;}
|
||||
|
||||
template<typename F> ButtonGadget* onClick(F f) { connect(this, &ButtonGadget::clicked, f); return this; }
|
||||
|
||||
signals:
|
||||
void clicked();
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue