Results 1 to 3 of 3

Thread: Add new QML component when binding with C++

  1. #1
    Join Date
    Aug 2012
    Posts
    55
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Add new QML component when binding with C++

    Now when I finally learned QML/C++ binding now I'm trying to make and import new component. For example, if I make application which consist only of QML files, then I have no problems with adding new components, like button. But if I make application which requires QML/C++ binding then Qt doesn't recognise my new component.
    So I have Button.qml file in same folder as main.qml. Then when I try to make something like this:

    Qt Code:
    1. Button{
    2.  
    3. ...
    4.  
    5. }
    To copy to clipboard, switch view to plain text mode 

    I get error that component can't be recognized. What's the problem

  2. #2
    Join Date
    Jan 2012
    Location
    Iran, Tehran
    Posts
    308
    Thanks
    75
    Thanked 24 Times in 21 Posts
    Qt products
    Qt4 Qt5 PyQt3 PyQt4
    Platforms
    Unix/X11 Windows

    Default Re: Add new QML component when binding with C++

    Are u sure that it is in a same directory as main qml? Can u post a sample or snapshot of your code?

  3. #3
    Join Date
    Aug 2012
    Posts
    55
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Add new QML component when binding with C++

    Sorry, my bad, actually Button.qml was poorly written.

Similar Threads

  1. qt binding?
    By giugio in forum Qt Programming
    Replies: 4
    Last Post: 15th November 2012, 14:33
  2. binding text in QMl to c++
    By rajeshk.ict in forum Newbie
    Replies: 1
    Last Post: 16th March 2012, 08:40
  3. Using binding to select on null or value
    By Mookie in forum Qt Programming
    Replies: 4
    Last Post: 26th June 2011, 14:05
  4. QUdpSocket binding
    By db in forum Qt Programming
    Replies: 0
    Last Post: 13th March 2008, 11:24
  5. binding
    By mickey in forum General Discussion
    Replies: 9
    Last Post: 26th September 2006, 21:54

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.