Thank you very much for the help
Added after 5 minutes:
This code is inside setupUi(QMainWindow* HistogramViewBase):
widget
= new QWidget(HistogramViewBase
);
frame = new Q3Frame(widget);
my_canvas = new TQRootCanvas(frame);
sizePolicy4.setHeightForWidth(m_canvas->sizePolicy().hasHeightForWidth());
my_canvas->setSizePolicy(sizePolicy4);
vboxLayout->addWidget(m_canvas);
widget = new QWidget(HistogramViewBase);
frame = new Q3Frame(widget);
vboxLayout = new QVBoxLayout(frame);
my_canvas = new TQRootCanvas(frame);
sizePolicy4.setHeightForWidth(m_canvas->sizePolicy().hasHeightForWidth());
my_canvas->setSizePolicy(sizePolicy4);
vboxLayout->addWidget(m_canvas);
To copy to clipboard, switch view to plain text mode
Hello, here it is the definition,
TQRootCanvas::mouseMoveEvent(e);
if (e) {
TCanvas *the_canvas=::getCanvas(this);
if (the_canvas) {
PadRestore save_pad;
gPad = the_canvas->GetSelectedPad();
TObject *selected = the_canvas->GetSelected();
if (selected) {
const char *message_text = NULL;
if (!selected->InheritsFrom(TVirtualPad::Class())) {
message_text = selected->GetObjectInfo(e->x(), e->y());
}
if (selected->InheritsFrom(TNamed::Class())) {
// message = static_cast<TNamed *>(selected)->GetTitle();
// message += " [";
message += static_cast<TNamed *>(selected)->GetName();
message += " : ";
// message += "] : ";
}
if (message_text) {
message+=message_text;
}
emit statusMessage(message);
} ...
void MyQRootCanvas::mouseMoveEvent(QMouseEvent *e) {
TQRootCanvas::mouseMoveEvent(e);
if (e) {
TCanvas *the_canvas=::getCanvas(this);
if (the_canvas) {
PadRestore save_pad;
gPad = the_canvas->GetSelectedPad();
TObject *selected = the_canvas->GetSelected();
if (selected) {
const char *message_text = NULL;
if (!selected->InheritsFrom(TVirtualPad::Class())) {
message_text = selected->GetObjectInfo(e->x(), e->y());
}
QString message;
if (selected->InheritsFrom(TNamed::Class())) {
// message = static_cast<TNamed *>(selected)->GetTitle();
// message += " [";
message += static_cast<TNamed *>(selected)->GetName();
message += " : ";
// message += "] : ";
}
if (message_text) {
message+=message_text;
}
emit statusMessage(message);
} ...
To copy to clipboard, switch view to plain text mode
Anyway I don't think the problem is inside here..
Bookmarks