Results 1 to 7 of 7

Thread: QtCreator and Desktop Components

  1. #1
    Join Date
    Jan 2012
    Posts
    3
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default QtCreator and Desktop Components

    I am using QtCreator 2.3.1 on Mac OS 10.7.2 and have installed the Desktop Components from http://qt.gitorious.org/qt-component...p/trees/master
    I did my qmake, make and make install
    It would appear that everything is installed correctly as if I do a import QtDesktop 0.1 I can see the new components in the design view.
    The problem is that if I drag one of these components onto the canvas I cannot see that component. It appears correctly in the edit view but does not display when running the program.

    I built against 4.8.0 and 474 and the appropriate folder was created in imports.

    I have tried everything that I can think of including removing, remaking, reinstalling everything again etc etc but still cannot get the components to appear in the design view.

    Your help would be very much appreciated.

    javascript Code:
    1. import QtQuick 1.0
    2. import QtDesktop 0.1
    3.  
    4. Rectangle {
    5. width: 360
    6. height: 360
    7. Text {
    8. text: qsTr("Hello World")
    9. anchors.centerIn: parent
    10. }
    11.  
    12. Button {
    13. id: button1
    14. x: 194
    15. y: -31
    16. width: 100
    17. height: 30
    18. text: "Button"
    19. }
    20. }
    To copy to clipboard, switch view to plain text mode 
    Last edited by wysota; 12th January 2012 at 12:02. Reason: missing [code] tags

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QtCreator and Desktop Components

    Do you by any chance have a file called Button.qml somewhere? Also the readme says you should import Qt Quick 1.1 and not 1.0.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Jan 2012
    Posts
    3
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: QtCreator and Desktop Components

    I do have a Button.qml, in my imports folder.

    I have tried importing QtQuick 1.1 but it does not make any difference.
    When I run the app then the Button does appear. It is just in the Designer window that I cannot see the button.
    I also noticed then when I place a button it has a negative y value. Naturally I increase this to bring it into the canvas. Don't know if this is significant in any way.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QtCreator and Desktop Components

    I'm a bit confused. First you said the component appears in the edit window but doesn't show up when you launch the application and now you say it doesn't show up while editing but does work when the app is launched. So which is it? Also do the examples bundled with Desktop Components work or not?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Jan 2012
    Posts
    3
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: QtCreator and Desktop Components

    Sorry to have been confusing, I was confused myself. When the app is run then the components appear as expected. When in the designer the components can be dropped onto the rectangle but do not show.

    This means that I can do the design in QML but would like to be able to design in the designer view.

    Thanks for your patience.

  6. #6

    Default Re: QtCreator and Desktop Components

    I have the same problem! Do you find out what the problem?

  7. #7

    Default Re: QtCreator and Desktop Components

    somebody help!

Similar Threads

  1. Iterate through set of components
    By QTie in forum Newbie
    Replies: 2
    Last Post: 15th June 2011, 07:01
  2. Replies: 0
    Last Post: 21st May 2011, 22:19
  3. ui components
    By addu in forum Qt Programming
    Replies: 0
    Last Post: 17th September 2009, 14:49
  4. Replies: 5
    Last Post: 31st January 2009, 07:36

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.