Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.2k Topics 77.9k Posts
  • [solved] some misunderstanding while using qt

    3
    0 Votes
    3 Posts
    1k Views
    B
    Sorry for disturbing i figured out the problem
  • SOLVED: Qt button assign command

    4
    0 Votes
    4 Posts
    2k Views
    M
    Do you know this document, if not please read it first. It's fundamental for develoing with qt. http://qt-project.org/doc/qt-4.8/signalsandslots.html
  • How to access QList<QObject*> items in QML

    9
    0 Votes
    9 Posts
    12k Views
    R
    [quote author="borut123" date="1345498136"] No other way. Try QAbstractListModel, it's not so difficult as it sounds.[/quote] Its not difficult. But for doing simple things like this why should we sub class one more class and deal with defining properties, functions etc, etc. This is how I feel. I'm alread having a tough time dealing with poniters (Esp. deleting QThread objects). So I don't want to create one more class. :-(
  • 0 Votes
    9 Posts
    4k Views
    M
    One option might be to run this code in the onStatusChanged handler of xmlModel instead of (or in addition to) Component.onCompleted, e.g. @onStatusChanged: if (status == XmlListModel.Ready) assemble_show_model()@
  • 0 Votes
    5 Posts
    3k Views
    D
    Thanks, setting up content at y position of -20 works!
  • Where to animate QML item?

    2
    0 Votes
    2 Posts
    1k Views
    D
    Hi, It seems perhaps simple, if you do some QML, to use animation inside it. Don't hesitate to give us your feed back on that :) dmcr
  • Populate QML with nested lists from Qt?

    2
    0 Votes
    2 Posts
    2k Views
    A
    No one has solution for my problem? Please help me...
  • Custom QGraphicsWebView - scrollbars always on

    2
    0 Votes
    2 Posts
    1k Views
    P
    Solved: @ QWebFrame* windowFrame = this->page()->mainFrame(); windowFrame->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAlwaysOff); windowFrame->setScrollBarPolicy(Qt::Horizontal, Qt::ScrollBarAlwaysOff);-- @ okay, so I have removed the scrollbars, but I don't want to make site bounded into the view area, is it possible?
  • Strange behavior of qtdesktopcomponents Checkbox

    3
    0 Votes
    3 Posts
    2k Views
    H
    Yes this code works @import QtQuick 1.1 import QtDesktop 0.1 ButtonColumn { exclusive: false CheckBox { id: checkbox1; text: "Checkbox 1"; checked: checkbox2.checked; onCheckedChanged: { checkbox2.checked = checked; checked: checkbox2.checked; } } Label { text: "checkbox1 checked: " + checkbox1.checked; } CheckBox { id: checkbox2; text: "Checkbox 2"; checked: checkbox1.checked; onCheckedChanged: { checkbox1.checked = checked; checked: checkbox1.checked; } } Label { text: "checkbox2 checked: " + checkbox2.checked; } } @ But I still have problem with binding property to C++ Q_PROPERTY, it wont work same manner
  • [Partially solved] QML Text seems to be horizontally aligned wrong

    6
    0 Votes
    6 Posts
    10k Views
    sierdzioS
    Glyph painting is a very hard job in general. Ultimately, that is probably a Qt bug, or type bug (glyph definition). You have to remember, that some letters are allowed to go beyond their registered space (take a 'y' for example, in some types, and especially in handwriting, it often even obscures other letters), others are allowed to join, etc. I had that problem in my code, too, I've added the aligning as above + adjusted the margins by hand. It seems to be working well, even during scaling, and on different operating systems.
  • Custom QML-Components with Designer integration

    5
    0 Votes
    5 Posts
    4k Views
    D
    Hi, after some discussed, I still consider that it is a bug in subcomponentmanager.cpp (yeah, please refer to the link). You may try to compile your own QtCreator to solve this issue temporally. [quote author="sierdzio" date="1344432200"]Try looking at "this":http://qt-project.org/forums/viewthread/16588 one, too. Not exactly a solution, but might help.[/quote]
  • [SOLVED]Accessing variables of other QML files

    14
    0 Votes
    14 Posts
    14k Views
    sierdzioS
    Uh, finally :) I'm happy you're ok now. Best wishes, happy coding!
  • [SOLVED (work-around)] QML Calling overriden functions

    8
    0 Votes
    8 Posts
    10k Views
    P
    Thanks for all your answers. Very helpful :-)
  • Print QML elements

    2
    0 Votes
    2 Posts
    3k Views
    M
    Are you using QtQuick 1.x? If so, I'd recommend looking at "QGraphicsView::render()":http://doc.qt.nokia.com/4.7-snapshot/qgraphicsview.html#render as one possible solution. Calling the "paint()":http://doc.qt.nokia.com/4.7-snapshot/qgraphicsitem.html#paint function of the item directly might also be an option.
  • Mask an image

    14
    0 Votes
    14 Posts
    7k Views
    M
    Ah, that's what I meant by "cut a hole" so that the background shows through. There's no way to put something on top of an item which would render the item below it transparent. If you just need an edge of the image to be invisible (rather than some arbitrary hole in the middle) you could make the image a child of a Rectangle element which has clip: true enabled, so that by adjusting the x and y offset of your image on the rectangle and the width and height of the rectangle itself, you could mask off any edges. (The rectangle becomes a window that masks off your Image.) I'm not sure what your use case is, but it may be a hack that could move you in the direction you need to go. For example (assume you have an Image that is 100x100): @ Rectangle { id: myrect clip: true width: 50 height: 50 Image { id: myImage source: "..." x: -25 y: -25 } } @ would cut 25 pixels off each side of the Image. Using: @ ... Image { id: myImage source: "..." x: 0 y: 0 } ... @ would show the top-left 50x50 pixels of your Image. Anyway, YMMV, but that may help some.
  • Qt Quick Training in London available Sept

    1
    0 Votes
    1 Posts
    969 Views
    No one has replied
  • [SOLVED] QML Loader: load once, use many

    4
    0 Votes
    4 Posts
    3k Views
    B
    Thanks, this works!!!
  • QQuickView setSource (qml) - hide() / show()

    3
    0 Votes
    3 Posts
    5k Views
    M
    Hi, This sounds like a bug -- I'd suggest lodging a bug report at http://bugreports.qt-project.org (preferably with a simple example) so the issue can be followed up. Regards, Michael
  • QVector3D maths in QML

    2
    0 Votes
    2 Posts
    2k Views
    M
    Hi, Javascript does not support operator overloading the way C++ does, so +/-/* do not perform vector manipulations the way you'd expect. For QtQuick 2.0 a number of functions have been added (see https://qt.gitorious.org/qt/qtdeclarative/commit/42f9444e983b5257241c17242471ca63f208c3f6 for details) to handle this. For QtQuick 1.x you may need to manipulate the sub-values directly (or Qt3D may provide more convenient ways of handling this, I'm not sure). Regards, Michael
  • [SOLVED] How to adjust image size retrieved from XML in WebView in QML?

    2
    0 Votes
    2 Posts
    4k Views
    H
    Solved it with some hints from my friend. Set it like this. The item fit in nicely. @WebView { id:web html: "<html><head><content="width=device-width"/><style> img{max-width:100%;max-height:device-height;} a:link {color: #0000FF; text-decoration: none;}</style> </head><body style="color:black">"+itemNews+"</body></html>"; transformOrigin: WebView.TopLeft preferredWidth:window.width - 10 settings.defaultFontSize : (window.width/480)*25 }@