跳到內容

QML and Qt Quick

Looking for The Bling Thing(tm)? Post here!
20.0k 主題 77.4k 貼文
  • Install module

    2
    0 評價
    2 貼文
    1k 瀏覽
    E
    I'm also with this problem. You could already find a solution?
  • Is qml Window element derived from Item?

    2
    0 評價
    2 貼文
    686 瀏覽
    dheerendraD
    Window is not inherited from item. Start with simple rectangle. You can refer to qt assistant for simple basic tutorial on QmL.
  • [SOLVED]Pressing a button doesn't stop running the code withing it's on_click definition.

    4
    0 評價
    4 貼文
    1k 瀏覽
    T
    Hi, I am not sure where to begin. My feeling is, you have a problem with the concept of event-loop, I will get to that in a moment. To clarify: you are wondering, that your event-handler is executed often instead of once? Concept of Event-Loop. This is your program-entry (??): @ int main(int argc, char *argv[]) { QApplication app(argc, argv); MyMainWindow window; window.show() return app.exec(); } @ "app.exec" enter the "Qt-Mainloop". This mainloop does something like this: @ // Event-Loop: while (1) { waitForEvent(); processEvent(); } @ So you see -- while an event is being processed, another event cannot be processed, until processing is done and the Event-Loop is reentered. Assuming that you are using "mouse-clicked", exactly one event should be fired when you press and then release the mouse-button over your button. Or have you used "press" and "release" signals? Now the question is, why your event-handler is called more than once. So there have to be multiple events in the queue which trigger your function. From your code I cannot see, why this is. Have you connected multiple signals to that slot? Can you give more code? Can you set a breakpoint in your handler-function and use the call-stack to find out, which events are triggering it? Best Regards, Tobias
  • How to open a new window in Android?

    6
    0 評價
    6 貼文
    3k 瀏覽
    T
    Thanks to you, sierdzio.
  • How to set the focus to a specific row/col in a TableView

    2
    0 評價
    2 貼文
    1k 瀏覽
    SGaistS
    Hi, Haven't tested it but what about the currentRow/Col properties ? Hope it helps
  • Dynamically create and delete controls on qml

    2
    0 評價
    2 貼文
    662 瀏覽
    p3c0P
    Hi, I think "qtqml-javascript-dynamicobjectcreation":http://qt-project.org/doc/qt-5/qtqml-javascript-dynamicobjectcreation.html and "Loader":http://qt-project.org/doc/qt-5/qml-qtquick-loader.html might help you.
  • [Solved] How can I disable Antialiasing for the Sceen Graph OpenGL Context? [Qt 5.3.1]

    2
    0 評價
    2 貼文
    1k 瀏覽
    B
    Problem Solved: @QOpenGLFramebufferObject* SceneRenderer::createFramebufferObject(const QSize &size) { QOpenGLFramebufferObjectFormat format; format.setAttachment(QOpenGLFramebufferObject::CombinedDepthStencil); format.setSamples(0); return new QOpenGLFramebufferObject(size, format); }@
  • Issue with Animations

    4
    0 評價
    4 貼文
    1k 瀏覽
    W
    Thank you very much, that was my problem. I thought there are the same, but I ignored the trigger.
  • [SOLVED] EV_KEY KEY_POWER not showing.

    3
    0 評價
    3 貼文
    2k 瀏覽
    I
    Sorry, i just forgot to install after compiling... It is working now.
  • Which renderer is utilized?

    3
    0 評價
    3 貼文
    997 瀏覽
    D
    LIBGL_ALWAYS_SOFTWARE=1 results in a rendering time just as long, so most probably software rendering was already used before due to lacking driver capabilities. QSG_VISUALIZE=batches shows, that all delegates within one view have the same color, so they are within the same batch(?). QSG_VISUALIZE=overdraw shows practically no multiply drawn areas. There is a trick to get QML+ HW-OpenGL (partially) running on my Chipset using the tool "driconf", but the target has a very lean firmware-like linux environment with no python installed, which is needed by "driconf". The trick is described "here":http://softsolder.com/2011/01/05/faking-opengl-2-0-on-intel-i945-hardware/. So, if someone can tell me how to enable/disable driver functions without "driconf", I might be saved :-)
  • How to drag a qml element to a widget

    4
    0 評價
    4 貼文
    1k 瀏覽
    p3c0P
    Can you show what you have started with ? Any trials ? In this way it would be easier for you to understand. You might need to check "Drag":http://qt-project.org/doc/qt-5/qml-qtquick-drag.html and it's this "example":http://qt-project.org/doc/qt-5/qtquick-externaldraganddrop-example.html. Just use Image element instead of Text. Waiting for you to try this first :)
  • QSGRenderThread on multi thread.

    2
    0 評價
    2 貼文
    5k 瀏覽
    slettaS
    It already is multithreaded. Since Qt 5.2, there is one dedicate render thread per window and what it does needs to happen in sequence. What you need to look at is why your application performs badly. Please see: http://qt-project.org/doc/qt-5/qtquick-visualcanvas-scenegraph-renderer.html for hints on how to fix your application.
  • QML element don't update with C++ Q_PROPERTY

    2
    0 評價
    2 貼文
    910 瀏覽
    dheerendraD
    You are not changing the value of text. You need to set the id for the text element. One you click on the onTriggered, you need to set the text for text element. Just try the following. @MenuItem { text: qsTr("Change Author") onTriggered: {var value = book_reg.getData(); authorme.text = value } } Text { id : authorme text: book_pro.author anchors.centerIn: parent Component.onCompleted: { book_pro.author = "John" } }@
  • [Solved] How I can add a qml object to QGraphicsScene using QtQuick 2.0?

    8
    0 評價
    8 貼文
    5k 瀏覽
    sierdzioS
    [quote author="adacosta" date="1409843743"]How I can mark this thread as solved?[/quote] Edit your first post and add [Solved] to the title.
  • Issues with signal and slot- Qt4

    2
    0 評價
    2 貼文
    849 瀏覽
    G
    There are a number of issues here, but to address your "No such slot" problem, it seems to me as if you are attempting to connect your SIGNAL to a QComboBox (ui_.sequence_combo_box)...and QComboBox does not have a SLOT called readSequenceFile(...) To connect to your sequence feeder object's readSequenceFile(...) slot, you should probably connect to "this". @connect(ui_.evaluation_box, SIGNAL(currentIndexChanged(QString)), this, SLOT(readSequenceFile(char *,char *,struct dirent *))); @ Having said that, you will now run into additional issues since your signatures don't match. I suggest you read the docs a little bit more :)
  • [solved] How to define a custom group property?

    7
    0 評價
    7 貼文
    3k 瀏覽
    D
    Interesting idea! I'll check that out!
  • Loaded QQuickItem, how to set properties correct?

    9
    0 評價
    9 貼文
    3k 瀏覽
    p3c0P
    Connect the heightChanged signal to a slot, then get the height of item1 and then setProperty to item2.
  • IPad orientation changes in qml

    2
    0 評價
    2 貼文
    995 瀏覽
    D
    Hmm, try out to handle change signals on width or height of your ApplicationWindow. I would think the orientation is finished if the width or height is changed.
  • How to establish connection from QtSystemTrayIcon menu items to QML

    4
    0 評價
    4 貼文
    1k 瀏覽
    p3c0P
    The only way I could think of is connecting the triggered() signal to a slot where you would then load the QML.
  • Navigation bar on bottom

    2
    0 評價
    2 貼文
    1k 瀏覽
    dheerendraD
    There is not direct way to do this. You need to write component to make this happen. You can use the ListView at the bottom to show all the qml files. Handle the mouse events to check with element has been clicked. Based on this either push or pop the contents.