Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-12613

Navigation to and from QLabels with links does not work correctly

    XMLWordPrintable

Details

    Description

      When having a label that contains a link then

      • it takes two tabs to get the link to appear to have focus
      • it is not possible to Shift+Tab backwards once the label is entered.

      The following example demonstrates the problem:

      #include <QtGui>
      
      int main(int argc, char** argv)
      {
      	QApplication app(argc, argv);
      	QWidget wid;
      	
      	QLabel label("some text", &wid);
      	QLineEdit edit(&wid);
      	QLabel linkLabel("<a href=\"TEMP_STRING\"><span style=\"text-decoration: underline; color:#0000ff;\">Click Me!</span></a>", &wid);
      	linkLabel.setTextInteractionFlags(Qt::TextBrowserInteraction);
      
      	QVBoxLayout layout(&wid);
      	layout.addWidget(&label);
      	layout.addWidget(&edit);
      	layout.addWidget(&linkLabel);
      	wid.show();
      	return app.exec();
      
      }

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            naevdal Sigrid Fjell Nævdal (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes