Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k Topics 77.3k Posts
  • PageStack.find and qml files pages [Solved]

    7
    0 Votes
    7 Posts
    5k Views
    C
    ahh got it. thanks a million. Solved
  • ListView selection based on text input

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • [Solved] Yet another QWidget in QML Question

    6
    0 Votes
    6 Posts
    3k Views
    F
    Thank everyone, I finally solved this problem by using @ QmlApplicationViewer viewer; pViewContext = viewer.rootContext(); vizWinHandle = (void*) viewer.viewport()->winId(); @ in main.cpp and passing the coordinates of an Image to the OEM driver from QML. NOTE: This is not an ideal solution for most applications because if the window is moved or resized, the region does not follow. But, it just so happens that my application is required to run in full screen so this problem is moot. The problem with QGraphicsProxyWidget is not that I could not get a proper HWIN. The problem was that that QGraphicsProxyWidget does not provide the actual widget coordinates. So when passing the rectangle to the OEM driver, the specified region was off the screen.
  • [Solved] SetIcon not working for a QPushButton

    7
    0 Votes
    7 Posts
    7k Views
    EddyE
    Ok my mistake. I tend to avoid spaces in filenames. A long time ago i worked on DOS ;)
  • -static configure flag for imports

    2
    0 Votes
    2 Posts
    2k Views
    P
    That's a possible way to create static imports: Build the plugin statically, link it to your app. Look for the qmlRegisterType() code in the plugin. Create a plugin.cpp file in your app which includes that code.
  • Transparency for an rectangle is not working.

    6
    0 Votes
    6 Posts
    7k Views
    M
    How abt below setup?? @ QDeclarativeView view; view.setWindowFlags(Qt::FramelessWindowHint); view.setAttribute(Qt::WA_TranslucentBackground); view.setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); view.setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); view.setStyleSheet("background: transparent"); view.setFrameStyle(QFrame::NoFrame); @ [EDIT: code formatting, Volker]
  • [SOLVED] Memory release when apps switched to background

    5
    0 Votes
    5 Posts
    2k Views
    H
    Thanks Michael, works like charm ;-) Just wonder why this useful tip is not documented anywhere.
  • QML box-2d demo example - how to compile

    18
    0 Votes
    18 Posts
    13k Views
    M
    hi, i can put Box 2D where QTSDK installed like(C:\QtSDK\Desktop\Qt\4.7.4\mingw\imports\Box2D_v2.2.1). and i run my project from this "c:\" but this error comes C:\Box2DDemo_v0_2\qmlbox2ddemo\box2ddemo-build-desktop-Qt_4_7_4_for_Desktop_-MSVC2008__Qt_SDK__Debug..\src\qml-box2d\box2dbody.cpp:167: error: C2065: 'M_PI' : undeclared identifier C:\Box2DDemo_v0_2\qmlbox2ddemo\box2ddemo-build-desktop-Qt_4_7_4_for_Desktop-MSVC2008__Qt_SDK__Debug..\src\qml-box2d\box2dbody.cpp:194: error: C2065: 'M_PI' : undeclared identifier C:\Box2DDemo_v0_2\qmlbox2ddemo\box2ddemo-build-desktop-Qt_4_7_4_for_Desktop-MSVC2008__Qt_SDK__Debug..\src\qml-box2d\box2dfixture.cpp:204: error: C2057: expected constant expression C:\Box2DDemo_v0_2\qmlbox2ddemo\box2ddemo-build-desktop-Qt_4_7_4_for_Desktop-MSVC2008__Qt_SDK__Debug..\src\qml-box2d\box2dfixture.cpp:204: error: C2466: cannot allocate an array of constant size 0 C:\Box2DDemo_v0_2\qmlbox2ddemo\box2ddemo-build-desktop-Qt_4_7_4_for_Desktop-_MSVC2008__Qt_SDK__Debug..\src\qml-box2d\box2dfixture.cpp:204: error: C2133: 'vertices' : unknown size
  • Is multiple QNetworkAccessManager per process disrecommended?

    6
    0 Votes
    6 Posts
    9k Views
    M
    I think multiple instances problem of QNAM should be fixed in Qt 4.8. Anyway, it's rather confusing, which is pretty strange for Qt library.
  • How to delete/remove screen/page from the display?

    3
    0 Votes
    3 Posts
    3k Views
    A
    Actually it has some timing issues, to make it work we need to delay the process of setting new source to the Loader, for that we need to first set it to 'undefined' and set timer of around 200 ms and when timer triggers then we need to set the new source and then we have to call setMask on this top level window. if we do all this without using timer then after masking we can see the previous screen. I think QT needs some time to remove/clear the loaded screen/page in the Loader Element before loading new page.
  • A pager with nine thumbnails per page

    5
    0 Votes
    5 Posts
    3k Views
    U
    [quote author="ZapB" date="1318861230"]Why can't you make a pager out of a GridView? Just a case of scrolling by 3 columns or rows each time. That way you don't have to mess around with proxy models etc.[/quote] It was to impossible to answer before , sorry by that. Probably you are right and I can use simply a GridView. However I need two things I couldn't do by now. How do I scroll by 3 columns each time and how do I know in which "page" is showing in this moment? Thank you.
  • [Solved] Vertical ListView in horizontal ListView

    5
    0 Votes
    5 Posts
    5k Views
    J
    Yes, it works for me.
  • 0 Votes
    1 Posts
    2k Views
    No one has replied
  • I want to pause my application .

    8
    0 Votes
    8 Posts
    4k Views
    D
    yes manishsharma, i have put following code on my application [if/else condition] to handle Active and on InActive mode. [myobject]= Qt.application.active ? "true" : "false";
  • QML listview element restriction vertical

    4
    0 Votes
    4 Posts
    3k Views
    M
    Hi, Okay, I misunderstood the original question. ListView itself doesn't restrict the number of items. Most likely you will need to do that at the model or UI level -- e.g. if you control how the user adds elements, you will need to implement your own limit to prevent them adding a 21st item. (also note that if your model always returned a count of <= 20, the ListView would never try to display more than 20 items) Regards, Michael
  • Database Question/Help

    6
    0 Votes
    6 Posts
    3k Views
    M
    Have you verified that loadDatabase is running to completion, e.g. that if (db) return; is not returning early (which is what I would expect with var db=1 for the declaration)?
  • QML, XML List Model, Basic Auth

    2
    0 Votes
    2 Posts
    3k Views
    S
    I would be happy for just a snippet with the "regular" ListModel with javascript, as it seems there are no examples for that as well. Perhaps we should wrap up a QNAM (if it is not already available from QML) into QML?
  • How to get index property inside VisualItemModel's elements?

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Is there an API in QML similar to setMask() API of Qt?

    6
    0 Votes
    6 Posts
    4k Views
    J
    It is worth pointing out that meego has this feature built in: http://harmattan-dev.nokia.com/docs/library/html/qt-components/qt-components-meego-maskeditem.html And even if you are on a different platform, you can just grab the source code from here: http://qt.gitorious.org/qt-components/qt-components/blobs/master/src/meego/mdeclarativemaskeditem.h (.cpp) In Qt Quick 2, you could use a shader to achieve the same thing.
  • Qt Quick Desktop Components: Dial - step size

    4
    0 Votes
    4 Posts
    2k Views
    J
    I pushed a fix to the Dial control that adds a tickMarksEnabled property, just like in the Slider. Sorry for the confusion. Don't hesitate to report missing features like this on the bug tracker in the future. Mark as "Qt Quick Components"/desktop.