Skip to main content

QCustomLinkPreview

QCustomLinkPreview

A shared-link preview card.

The row seen under the "Links" tab: a rounded thumbnail (a real favicon / image via setThumbnail, or a painted gradient with the site initial as a fallback), the link title (bold, elided), the domain (muted) and an optional one-line description. Feed it with setLink(title, url, description=None, thumbnail=None) or the Designer qproperties. Clicking emits clicked(url). The card panel + text colours are driven from the app QSS (objectName selectors) so they flip with the theme.

At a glance​

TierFree (GPLv3)
Importfrom Custom_Widgets.QCustomLinkPreview import QCustomLinkPreview
Qt DesignerYes — drag it from the palette

Quick start​

from Custom_Widgets.QCustomLinkPreview import QCustomLinkPreview

widget = QCustomLinkPreview()

Dark theme​

Colours come from the design tokens, so the widget follows the app theme with no extra work.

QCustomLinkPreview in dark theme

Properties​

Every property below is settable in code and in Qt Designer.

PropertyTypeDefault
titlestringShared link
urlstringexample.com
descriptionstring—

Signals​

Signal
clicked(QString)

Methods​

MethodDescription
clicked(...)Clicked.
description(*args, **kwargs)Description.
setLink(title, url, description=None, thumbnail=None)Set the link.
setThumbnail(pm)Set the thumbnail.
title(*args, **kwargs)Title.
url(*args, **kwargs)Url.

QCustomAgendaList · QCustomAlert · QCustomAvatar · QCustomAvatarGroup · QCustomBadge · QCustomCard · QCustomChip · QCustomChipGroup