Is there a way to check if the orientation of screen changes during runtime...
Hi, I am building a UI in QML for tablets. I want to define 2 different modes: landscape and portrait. Is there a way to check during runtime, if the orientation has changed hence the IU will switch to...
View Article[QML]javascript global "this"
sorry to reply late. what I want to do is writing code in separate js file. Then include the file use Qt.include. The code may use this, but Qt.include does not support apply,like...
View ArticleHow do I print the "id" attribute of Item?
Hi, You cannot print the id attribute. It is not similar to other property attributes. More info here [qt-project.org]
View ArticleQML has vertical or horizontal separator control?
Hi, Like MenuSeparator, QML has separator? Any inputs. Thanks.
View ArticleProblem with macdeployqt on Qt 5.4 RC
Hi everyone! I’ve finished script to fix link paths after macdeployqt tool. My script looks like: #!/bin/bash BUILD_FOLDER_PATH=$1...
View ArticleIs there a way to check if the orientation of screen changes during runtime...
You can monitor the orientation (and other details) using Screen [qt-project.org] element.
View ArticleQML has vertical or horizontal separator control?
You can always turn to rectangles with top/bottom or left/right anchors to the parent and a small value for width or height.
View ArticleSharing a singleton object in C++ and QML: am I on the right way ?
Make the destructor private and QML will have no power to touch it ;-) I think the warning is there mostly to make sure the developers don’t destroy the singleton themselves while QML engine is still...
View ArticleQML GridView and QSortFilterProxyModel
I believe you have the model sorted you need to set the sortOrder again. At least that’s how it was done in the example.
View ArticleHow do I print the "id" attribute of Item?
Printing the item using its id (rather than the id property of the item) works. If the objectName property is defined, that will also be output. For example: Item { id: myItem...
View Article[QML]javascript global "this"
Unfortunately, your .js file cannot use this. You have two options: Put the code inside your QML window component itself, OR Give your JS function a var argument, and pass your window into the JS...
View ArticleConnect QML signal to CPP slot, or method [SOLVED]
It looks like you’re just experimenting and learning but I thought I would point out in case you don’t know that: QML is automatically aware of Qt C++ slots so you could eliminate the QML signal, the...
View ArticleQML interface not fully initialised when main window is shown
This isn’t enough information to go on. Can you create a small code sample that replicates the problem? In the meantime I’ll take a stab in the dark. Having a long running process in the main GUI...
View ArticleHow to set text to TextInput from C++
I have multiple QML files (for navigating through the application) I have created one TextInput Qml as a quantity.qml For the quantity field i want to sent the data from the weighing scale. When i send...
View ArticleQML application crashes, How to debug it?
Hi, I’ve written an application with qtQuick (integrated with QtWidgets via createWindowContainer) bug it crashes and I have no idea where it initiates the crash. Is there any way to debug it to trace it?
View Article[SOLVED]add child to a QQuickItem
Hello, I want to add some child objects to a custom QQuickItem Plugin in c++. for this I add the objects in the constructor of the parent QQUickItem: overlay.setParent(this);...
View ArticleHow I can use queue of requests in QNetworkAccessManager?
Hi everyone! In my application i need to send a many requests to server and i want to use queue with this request. How I can use it in QNetworkAccessManager? Thanks for any help!
View ArticleHow can I capture Command+Q in a Qt Quick application?
My application creates a QApplication, then a QQuickView, and then moves through the various screens by changing the “url” property of the QQuickView’s rootObject(). The application is supposed to...
View ArticleHow to set text to TextInput from C++
Yes there is: “Extending QML – Signal Support Example” in Qt’s documentation
View Article