Cursor pointer on link hover for richtexts

This commit is contained in:
Sander Ferdinand 2018-04-28 18:53:32 +02:00
parent 1541d87122
commit 178be387bb
2 changed files with 8 additions and 1 deletions

View file

@ -26,7 +26,7 @@
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.0
import QtQuick 2.5
import QtQuick.Layouts 1.1
import "../components" as MoneroComponents
@ -43,6 +43,7 @@ Item {
property string fontFamily: ""
property alias wrapMode: label.wrapMode
property alias horizontalAlignment: label.horizontalAlignment
property alias hoveredLink: label.hoveredLink
signal linkActivated()
height: label.height * scaleRatio
width: label.width * scaleRatio

View file

@ -43,4 +43,10 @@ Label {
color: MoneroComponents.Style.dividerColor
opacity: MoneroComponents.Style.dividerOpacity
}
MouseArea {
anchors.fill: parent
acceptedButtons: Qt.NoButton
cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor
}
}