Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. Additional QTextDocument.MarkdownFeature

Additional QTextDocument.MarkdownFeature

Scheduled Pinned Locked Moved Unsolved Qt for Python
2 Posts 2 Posters 304 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Adamxxk
    wrote on last edited by
    #1

    I'm trying to add the flag MD_FLAG_WIKILINKS=0x2000 to the "base" MarkdownDialectGitHub so that I can have QTextDocument.setMarkdown(markdown, features=) handle the wikilinks syntax. However, I can't seem to make it work with PySide6 (I'm sure this is straightforward in the c++ function call).

    I've tried the following:

    • QTextDocument.setMarkdown(markdown, features=0x56dc)
      • ValueError: 'PySide6.QtGui.QTextDocument.setMarkdown' called with wrong argument values
    • using package aenum to extend QtGui.QTextDocument.MarkdownFeature
      • AttributeError: type object 'PySide6.QtGui.QTextDocument.MarkdownFeature' has no attribute 'member_map'
    • using features=cast(QtGui.QTextDocument.MarkdownFeature, 0x56dc)
      • ValueError: 'PySide6.QtGui.QTextDocument.setMarkdown' called with wrong argument values

    Any suggestions for how to specify the features besides the hardcoded 3 that are provided by Shiboken?

    1 Reply Last reply
    0
    • F Offline
      F Offline
      friedemannkleint
      wrote on last edited by
      #2

      Try QTextDocument.MarkdownFeatures(0x56dc).

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved