So complicating...just to not do it the proven way :) >>Anyhow, this opens the problem of if / how we should expose the "internal widget" used to represent those actions. As you say there are certain bits of QAction's API that are currently available in QToolButton's one. >That would basically mean leave the getter QWidget *sideWidget(enum Side) as it is,currently?
So, ` QWidget *sideWidget(enum Side) const; addAction(enum Side, QAction *); ` ? With Side Actions, how will the user maintain the buttons ordering? insertSideAction(enum Side, QAction *, QAction *before) ? removeSideAction(enum Side, QAction *) + addSideAction(enum Side, QAction *) ? Regards, Konstantin 2013/5/13 Friedemann Kleint <[email protected]> > Hi, > > > >In other words. can create the internal widgets in our > QLineEdit::addAction method and then call QWidget::addAction for > consistency, but ignore the generated QActionEvent. > > Yes, I guess this would be the way forward. Or is there any benefit in > handling the QActionEvent? > > > >Probably the mapping could be handled by the QLineEdit itself? In the end > it's how that action should be represented by that specific QLineEdit; the > same action added to /another/ lineedit can have a different behaviour. > > How so? - The only way is to temporarily store the 'side' value for the > action in between addAction() and handling of the QActionEvent somewhere. > > > >I don't remember exactly, when adding an action to a toolbar, is the > associated widget the toolbar or the created toolbutton (or both)? > > It is both, one would have to qobject_cast<>. > > > >Anyhow, this opens the problem of if / how we should expose the "internal > widget" used to represent those actions. As you say there are certain bits > of QAction's API that are currently available in QToolButton's one. > > That would basically mean leave the getter QWidget *sideWidget(enum Side) > as it is,currently? > > I hope I will find some time for this in the next days/weeks (this is a > bit of a "Creative Friday" project for me). > > > Regards, > Friedemann > > > -- > Friedemann Kleint > Digia, Qt > >
_______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
