开发者

QT Breadcrumb Navigation

I would like to add a breadcrumb navig开发者_Python百科ation bar to a QT application. In KDE there is KUrlNavigator which is used by dolphin. Is there a native QT widget?


qxtcrumbview in libqxt.org

Not documented, you need to download the source code in order to find this one.


This may be achieved with QLabel: There may be multiple links in a single QLabel, see QLabel::openExternalLinks() and Qt::TextInteractionFlags.
Or in more detail:

auto label = new QLabel(); 
label->setText(
  "<a href=\"https://doc.qt.io/qt-5/qlabel.html\">"
  "QLabel</a>::"
  "<a href=\"https://doc.qt.io/qt-5/qlabel.html#textInteractionFlags-prop\">"
  "textInteractionFlags</a>");
label->setTextFormat(Qt::RichText);
label->setTextInteractionFlags(Qt::TextBrowserInteraction);
label->setOpenExternalLinks(true);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜