Maybe not the best way to do it, but pretty easy. You can write a public method for your Widget, and send your parameters when you call this special method. Maybe a little example can be better:
// Somewhere in code, create an instance of some widget
viewer = new Viewer(frame3D, "graf");
// we need to send X and Y dynamic sizes, so:
viewer->param(sizeX, sizeY);
// put 'viewer' on screen...
viewer->show();
//.................
// Somewhere in code, create an instance of some widget
viewer = new Viewer(frame3D, "graf");
// we need to send X and Y dynamic sizes, so:
viewer->param(sizeX, sizeY);
// put 'viewer' on screen...
viewer->show();
//.................
To copy to clipboard, switch view to plain text mode
Note that we call param() before actually showing the widget. This way
param executes just after construct, and after init(), but before the widget is shown.
Class Viewer, must have a public method param():
void Viewer::param(int X, int Y) {....}
void Viewer::param(int X, int Y) {....}
To copy to clipboard, switch view to plain text mode
Hope this aproach can help someone.
Bookmarks