Skip to content

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k Topics 77.4k Posts
  • [SOLVED]Image doesn't appear while running from qt creator

    4
    0 Votes
    4 Posts
    1k Views
    EddyE
    great you solved it. could you please edit the title of your first post and add [solved] to it?
  • Qt4.8 assigning a JavaScript function to a property

    2
    0 Votes
    2 Posts
    690 Views
    U
    I thought this was interesting. While you can't assign a function apparently, you can declare a function when use a component. So below, thing1 will use the somefunc declared in the Thing component. thing2 will use the custom somefunc declared when we declare thing2. Still can't find a better way. main.qml: @ import QtQuick 1.0 Item { Thing { id: thing1 } Thing { id: thing2; function somefunc() { console.log("custom func") } } } @ Thing.qml: @ import QtQuick 1.0 Item { function somefunc() { console.log("default") } Component.onCompleted: { somefunc(); } } @
  • QtQuick Error on Android(3009 (EGL_BAD_MATCH))

    18
    0 Votes
    18 Posts
    13k Views
    D
    Anybody try issue in Qt 5.3?
  • Send ListModel from QML to C++

    4
    0 Votes
    4 Posts
    3k Views
    X
    setData is just to update an already existing data row I guess, if you want to add new data you should implement your own function/slot for that I think and you can do what you want in there, if you want add 10 rows at once or whatever. You just have to emit the proper signals so the views knows that you have added some new rows, see here: http://qt-project.org/doc/qt-5/qabstractitemmodel.html#beginInsertRows
  • Can't get QT5.0 to find qtdesktopcomponents

    7
    0 Votes
    7 Posts
    4k Views
    M
    thanks please look at this thread http://qt-project.org/forums/viewthread/41852/
  • [SOLVED] How I can get HTML from QDomElement object.

    2
    0 Votes
    2 Posts
    977 Views
    shavS
    If you need to save HTML content of some HTML tag from QDomElement instance you can use code: @ //.... QDomElement itemTag = contentTags.at(k).toElement(); //..... QString content; QTextStream ts(&content); itemTag.save(ts, itemTag.childNodes().count()); qDebug()<<"content: "<<content; //<----Draw HTML code of itemTag @
  • QML plugin for QtForum

    6
    0 Votes
    6 Posts
    1k Views
    shavS
    Yesterday Apple was approved my application for Qt Forum, so you can "download":https://itunes.apple.com/ru/app/qtforumreader/id865207357?l=en&mt=12.
  • Circular Progress Bar

    7
    1 Votes
    7 Posts
    21k Views
    ?
    [quote author="p3c0" date="1398316564"]Hi, Have a look at "Knobs 'n' Dials":http://qt-project.org/forums/viewthread/35503/ . May be it would help you. Those were created on the same lines.[/quote] Hi, I looks really nice. Anyway I have used BusyIndicator proposed by leon. I will switch to Knobs 'n' Dials later. Ansif
  • QtCreator crashed on QQuickView memory allocation

    2
    0 Votes
    2 Posts
    866 Views
    Q
    Have you just tried to create the QQuickView object on the heap instead of the stack. @ //Header File QQuickView *a; //Source File a = new QQuickView(......); @
  • Problem with QtQuick Controls

    31
    0 Votes
    31 Posts
    21k Views
    A
    Yes, It did not work properly.
  • QtQuick deployment - blank screen

    4
    0 Votes
    4 Posts
    2k Views
    M
    hey there i want to know that did you solve your problem? i have same problem to you, and i need know about solution of that. i really thanks to you if share your searching result thanks
  • QtQuick not installed

    3
    0 Votes
    3 Posts
    3k Views
    M
    hi i want to know that your problem is solved? if yes please tell me how? and if with QML2_IMPORT_PATH, please tell me what is its value? QML2_IMPORT_PATH = ? thanks
  • [solved]Property binding to pointer value

    2
    0 Votes
    2 Posts
    1k Views
    W
    Hello, i have tested the example again. I observed that the view correctly updates on the change of the sourceComponent from the QSortFilterProxyModel. The problem is that the ListModels onModelChanged signal is not emitted. The problem in my application was that i changed the index of the ListView in its onModelChanged handler. In the case of the QSortFilterProxyModel as model, the handler is not called when the sourceModel of the QSortFilterProxyModel changes, and the index was not set correctly. Thanks
  • Pressed mouse buttons

    3
    0 Votes
    3 Posts
    1k Views
    EddyE
    tip: use a @ console.log("clicked blue") @ in the last Mousarea too to get even more feedback from this setup.
  • 0 Votes
    5 Posts
    5k Views
    D
    Hello, unfortunately the solution provided does not work with Qt Quick 2 anymore. On my Mac I get the following error while retrieving the user-agent (according to the problem report generated): bq. Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000 VM Regions Near 0: --> __TEXT 0000000100000000-0000000100009000 [ 36K] r-x/rwx SM=COW /Users/USER/*/UserAgentProvider.app/Contents/MacOS/UserAgentProvider Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 QtWebKitWidgets 0x000000010002ba3f WebKit::initializeWebKitWidgets() + 47 1 QtWebKitWidgets 0x000000010001e63f QWebPagePrivate::QWebPagePrivate(QWebPage*) + 207 2 QtWebKitWidgets 0x0000000100022af7 QWebPage::QWebPage(QObject*) + 55 3 com.yourcompany.UserAgentProvider 0x0000000100006527 UserAgentProvider::UserAgentProvider(QWidget*) + 39 (useragentprovider.cpp:5) 4 com.yourcompany.UserAgentProvider 0x00000001000064ed UserAgentProvider::UserAgentProvider(QWidget*) + 29 (useragentprovider.cpp:6) 5 com.yourcompany.UserAgentProvider 0x0000000100005d15 main + 149 (main.cpp:15) 6 com.yourcompany.UserAgentProvider 0x0000000100005c74 start + 52 bq. I suppose this has to do with using a QGuiApplication instead of a QApplication object as in Qt Quick 1. Any hints to get this working with Qt Quick 2? Regards DaBoba
  • 0 Votes
    4 Posts
    4k Views
    D
    Quick example. It's just my main (shrinked of useless declarations): @ Application app(argc, argv); // Viewer object to handle QML types QtQuick2ControlsApplicationViewer viewer; // Registering CUSTOM types qmlRegisterType<ClassName>("ClassName", 1, 0, "QMLNAME"); // Registering SINGLETON CUSTOM types qmlRegisterSingletonType<AppInfo>("qt.appInfo", 1, 0, "AppInfo", singletonObject); // Load initial QML file viewer.setMainQmlFile(QStringLiteral("qml/HS2/main.qml")); viewer.show(); // main loop starts return app.exec(); @ In this example I've registered both a singleton class (i.e. a class which is instanced only ONCE in the program) and a non-singleton one. In simple projects you can always set the registration URL (first parameter) equal to the name of the class. Here I've added "qt" as the initial url. In the QML I can import the type and create an object as usual: @ import ClassName 1.0 // <--- Major/minor == values passed to registration! QMLNAME { id: myId width: ... height: ... anchors.centerIn: parent Component.onCompleted: initFunctionDefinedInTheRegisteredTypeIfAny() } @ Have a look to "this page":http://qt-project.org/doc/qt-5/qtqml-cppintegration-definetypes.html for further examples and clarifications! Enjoy! ;)
  • Resizing window issue(Solved)

    3
    0 Votes
    3 Posts
    889 Views
    EddyE
    thanks for posting your solution back in the forum. maybe others can benefit from it.
  • Qt 4.8 -> Qt 5.2

    1
    0 Votes
    1 Posts
    552 Views
    No one has replied
  • Incrementing object values

    6
    0 Votes
    6 Posts
    2k Views
    K
    Ahh sry :) My bad. You are right... Didnt read to the end :P
  • Add qml object to QGraphicsScene

    1
    0 Votes
    1 Posts
    627 Views
    No one has replied