Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. How to implement custom type

How to implement custom type

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
3 Posts 3 Posters 289 Views
  • 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.
  • SPlattenS Offline
    SPlattenS Offline
    SPlatten
    wrote on last edited by
    #1

    I want to implement a new Text class based on the existing Text class but with added functionality, events and properties. Is there a good tutorial that will demonstrate exactly how I can do this ?

    Kind Regards,
    Sy

    1 Reply Last reply
    0
    • JoeCFDJ Offline
      JoeCFDJ Offline
      JoeCFD
      wrote on last edited by
      #2

      Create a new xml file as NewText.qml and use the existing Text in it like
      ExistingText {
      ...
      }

      B 1 Reply Last reply
      0
      • JoeCFDJ JoeCFD

        Create a new xml file as NewText.qml and use the existing Text in it like
        ExistingText {
        ...
        }

        B Offline
        B Offline
        Bob64
        wrote on last edited by
        #3

        What @JoeCFD said is what I have done to customise some built-in QML components but it depends whether everything that needs doing can be done at the QML level. For example, if extensions are needed at the underlying C++ level there is not really any support to do this. Probably you would need to copy the source of QQuickText to a new class and add the extensions to it.

        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