跳到內容

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k 主題 77.4k 貼文
  • QtMultimediaKit in Windows XP

    6
    0 評價
    6 貼文
    2k 瀏覽
    J
    It works now, maybe a Windows restart was needed. Anyway thanks for your help.
  • Font Loading Issues on OSX Qt5.1 Beta Qt Quick 2.0

    6
    0 評價
    6 貼文
    3k 瀏覽
    R
    Hey Thanks we can close this one as solved, I filed a bug report. Your right forums are bad places to post bugs. I will likely post if asking if someone gets similar behaviour and then file a bug report. Anyways heres the report if your interested I will likely post more bugs as I go along https://bugreports.qt-project.org/browse/QTBUG-31359 thanks again!
  • QQuickView fullscreen glitch OSX?

    5
    0 評價
    5 貼文
    4k 瀏覽
    R
    Yeah got the same issue here
  • How to access v8's debug API in QJSEngine

    1
    0 評價
    1 貼文
    1k 瀏覽
    尚無回覆
  • how two connect two qml file using simple buttom

    11
    0 評價
    11 貼文
    5k 瀏覽
    W
    Aha. So, I'll create one main.qml with the specific UI pages based on components and use visible as switch. Thanks.
  • [SOLVED] Wierd looking text in TableView section in Qt 5.1.0 Beta

    7
    0 評價
    7 貼文
    4k 瀏覽
    R
    Unfortunaltey I do not get a real solution to the problem, but I found setting "renderType: Text.NativeRendering" of text that renders wierd to use solved my immediate problem. There are some disadvantages to this when the text is animated in any way. The blog post explains it in more detail: "Native-looking text in QML 2":http://blog.qt.digia.com/blog/2012/08/08/native-looking-text-in-qml-2/ Below is how I changed my text to display properly: @ Text { id: ta x: 20 text: section renderType: Text.NativeRendering // Added this } @ Hope that helps.
  • Program doesn't generate QML

    4
    0 評價
    4 貼文
    2k 瀏覽
    SGaistS
    That's the wrong template, you should create a new Qt Quick application
  • Error: array initializer must be an initializer list or string literal

    3
    0 評價
    3 貼文
    13k 瀏覽
    A
    It is discouraged to use C-style static arrays in C++; the code you wrote will probably not compile because of not specifying an array size beforehand. Instead of going this way, have a look at "C++ std::string":http://www.cplusplus.com/reference/string/string/ or better yet, since you're dabbling in Qt, stick to "QStrings":http://qt-project.org/doc/qt-5.0/qtcore/qstring.html when wanting to represent textual data of any kind and to "QByteArrays":http://qt-project.org/doc/qt-5.0/qtcore/qbytearray.html when wanting to represent "lower-level" data (bytes, flags, et cetera). @#include <QByteArray> #include <QDebug> #include <QString> int main() { QString string = QString::fromUtf8("This is a test QString variable. ½ ¼ ¾ ⅓ ⅔ † ‡ µ ¢ £ €"); QByteArray array = string.toUtf8(); qDebug() << string; qDebug() << array; }@
  • OpenGL 3.2+ and Qt Quick2

    13
    0 評價
    13 貼文
    5k 瀏覽
    W
    I just compiled and ran the exact same code on windows on the same machine and it worked perfectly. It seems it's an OS X issue :/
  • Remove element from Row when changing states

    1
    0 評價
    1 貼文
    575 瀏覽
    尚無回覆
  • How to access other QML elements ?

    2
    0 評價
    2 貼文
    899 瀏覽
    A
    You should read on the "QML Object identifier attribute":http://qt-project.org/doc/qt-5.0/qtqml/qtqml-syntax-objectattributes.html#the-id-attribute, and then also on the "QML Object scope":http://qt-project.org/doc/qt-5.0/qtqml/qtqml-documents-scope.html#component-scope.
  • What is .qmlproject file?

    3
    1 評價
    3 貼文
    10k 瀏覽
    T
    .qmlproject is used by Qt Creator to handle projects that are QML-only. As Tomma already said, these kinds of projects use the Qmlviewer application to show QML files. This is rather convenient to play with small examples, but requires that a qmlviewer is installed. It also makes it close to impossible to use such projects on devices since it is very hard to limit these apps in what they can do. Basically the qmlviewer will need to have all the interesting permissions (access the network, etc.) so that all Qml applications will actually run in it and all these Qml applications will inherit those permissions. That is why bigger non-toy things have a .pro file that builds a small piece of code that is basically a stripped down Qmlviewer application and bundles that with the Qml files. This is a separate binary then which gets its own set of permissions. Since this binary is specific to one Qml application you can limit the program to those it actually needs to function.
  • Transparent QQuickView on Windows 7, works with Qt5.0.2 but broken on Qt5.1

    2
    0 評價
    2 貼文
    2k 瀏覽
    T
    Please "file bug reports":https://bugreports.qt-project.org/ about regressions. Bugreports will be seen by the developer, while it takes a bit of luck for the issue to get noticed here.
  • OpenGL (QGLWindow) functionality in QDeclarativeView

    7
    0 評價
    7 貼文
    4k 瀏覽
    W
    Just found out that signals in QML (to c++) don't work. Changed QDeclarativeView->setScene etc. to QDeclarativeView->setSource Now it works. QGLWindow overlaps qml page.
  • Importing an existing QScriptExtensionPlugin to QML

    7
    0 評價
    7 貼文
    3k 瀏覽
    T
    Now that I'm finally porting our Qt4 code to Qt5 I need to solve this issue somehow. to QJS[X] seems to be mostly straightforward stuff. Still, solution to the original problem with integrating my custom extensions to QML applications isn't obvious. Could someone elaborate the stuff a bit? I don't believe our need is unique in any way: we just need to be able to use our JavaScript extensions from both JavaScript and QML. I'm really surprised how difficult it really is to extend JavaScript this way in Qt5. It may be due to the lack of documentation, and I may certainly have missed something, but this is how I see it: QtScript seems to be phased out, and it isn't compatible with QML anyway. There is no documented extension mechanism for QJSEngine. There is an extension mechanism for QML, but the JavaScript global object is read-only. The simple question is: how do I add my own JavaScript extensions to QML applications? This is already a bit out of topic, but I have to admit I'm bit lost regarding the integration of C++ and QML code. I cannot see QJSValue appear anywhere in QML documentation. Does this mean QML has its own set of reflection objects to the C++ side? Such as QQmlProperty? Let's assume I have this QML code: @ // main.qml import QtQml 2.0 QtObject { id: test function test() {} } @ Assume I have created an object out of the "test" component: @ QQmlEngine engine; QQmlComponent component(&engine, QUrl::fromLocalFile("main.qml")); QObject* test = component.create(); @ Now I have a QObject pointer in C++. How do I iterate the properties and functions the QML object has? How do I add another function, say test2() to the object? What about adding properties? How do I call test()?
  • I need to connect a ComponentA Signal to a method of another ComponentB

    5
    0 評價
    5 貼文
    2k 瀏覽
    S
    Thank you but i have a new problem with connections. Why i can't sometime access someObject with his unique ID ?
  • Qt MultmediaKit

    9
    0 評價
    9 貼文
    4k 瀏覽
    M
    [quote author="aabc" date="1352733663"]Does it work now ?[/quote] Yes, works fine. I installed this package: http://packages.ubuntu.com/quantal/libdeclarative-multimedia
  • The problem with exception handle in QML 2 plugin

    1
    0 評價
    1 貼文
    2k 瀏覽
    尚無回覆
  • Load shared library with QML files in resource file

    2
    0 評價
    2 貼文
    4k 瀏覽
    F
    I found out, that putting a DynamicallyLoadedTestItem into the main.qml file did work! But only if the import of the plugin is added in the main.qml, otherwise the same error with type not being found occurs. Here is the source code: @ // main.qml: import QtQuick 1.1 import MyPlugin 1.0 Item { // this DOES WORK! but only if import MyPlugin 1.0 is added in main.qml DynamicallyLoadedTestItem {} // this causes the error "TestItem is not a Type" TestItem {} } // DynamicallyLoadedTestItem.qml: import MyPlugin 1.0 TestItem { } @ It seems that in the first loaded qml file the dynamic library is not loaded, but when another file is loaded it is available. Shouldn't the QML engine take care of completely loading the library before initializing it? Or how can I load it in advance so the library is accessible when the first qml file gets parsed?
  • [SOLVED]Returning a QList<QHash<QString, QString> > to Qml ???

    4
    0 評價
    4 貼文
    6k 瀏覽
    T
    Thank you, it works wonderfully! QVariantList with QVariantMap is exactly what I was looking for :D I just wish I could mark a question as answered, and vote up answers and stuff...