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. Installing a reusable component in Visual Studio?

Installing a reusable component in Visual Studio?

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 2 Posters 327 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.
  • T Offline
    T Offline
    Tullhead
    wrote on last edited by
    #1

    Simple question from a newbie Qt user...

    Qt documentation explains how to create a "reuseable component", like a special button, and then you put it's definition in a file with a name starting with a capital letter and with qml extension - like SpecialButton.qml

    Then you can use this special button in your main.qml file. BUT.... there is one thing that I have not been able to find any doc or example of... how do I install or import or include my SpecialButton.qml file so that it will be found? In all my attempts, the debugger says that SpecialButton is undefined. I have a feeling that in the Qt Creator IDE this is handled in some automatic or simple way -- but how to do it in Visual Studio?

    1 Reply Last reply
    0
    • E Offline
      E Offline
      ElBrujo
      wrote on last edited by
      #2

      Adding your component .qml file to qml.qrc file should do the trick.

      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