- _widget.resizeColumnToContents(0);
- _widget.resizeColumnToContents(1);
- _widget.resizeColumnToContents(2);
+ line = line.replace('\t', ' ').toHtmlEscaped();
+ if (href != "") {
+ line = "<a href=\"" + href + "\">" + line + "</a>";
+ }
+ QLabel * instruction_label = new QLabel(line);
+ instruction_label->setTextInteractionFlags(Qt::TextSelectableByMouse|
+ Qt::LinksAccessibleByMouse);
+ instruction_label->setWordWrap(false);
+ instruction_label->setFocusPolicy(Qt::StrongFocus);
+ if (href != "") {
+ QObject::connect(instruction_label, &QLabel::linkActivated,
+ [=](QString str) {
+ if (str.startsWith("function:")) {
+ QString address = str.remove("function:");
+ mainwindow->switchMainPlaneToAddress(address.toInt(NULL, 16));
+ }
+ });
+ }
+ _layout.addWidget(instruction_label, current_row, 1);
+ instruction_label->setVisible(true);