Emitting signal from different thread causes QML to crash
Hi, I answer to that old thread because I have the exact same issue with Qt 5.2.1 and Qt 5.3 RC. Is it possible to use Connections to connect a C++ signal from a non-main thread to a QML slot ? The...
View Article[SOLVED] How to get path to photo gallery
Well, the pure QML may not help you in any way, I am looking for solutions too. As an alternate, QStandardPaths::standardLocations(QStandardPaths::PicturesLocation); sounds good.
View ArticleHelp me to make an Animation :-(
I want to animate ui when the view will be changed… Here is my code —> import QtQuick 2.2 import QtQuick.Controls 1.1 ApplicationWindow { visible: true...
View ArticleWhat are the differences between TextField and TextInput. Also TextArea and...
Both TextField and TextInput are single line text edit. TextInput seems to have more functions than TextField. Both TextArea and TextEdit support multi-lines text edit. And the functions are similar. I...
View ArticleWhat are the differences between TextField and TextInput. Also TextArea and...
TextEdit and TextInput are derived classes from … QWidget I think TextArea and TextField was added with QtQuickControls. They are derived classes from … QQuickItem. Thanks Hawk, but Jens was right, I...
View Article[SOLVED] How to call Javascript function OR Q_INVOKALBE on dynamically...
Ok, I found it out by myself. I have to call the createObject() method on the QmlComponent instance. var testScreen = Qt.createComponent("TestScreen.qml").createObject(parent);
View ArticleHow to get mouse click event on widget component
Hi I loaded c++ widget into qml file. After placing the widget I added MouseArea of the widget component. I am not able to get onclicked event when i click the widget. How I can solve the problem. Any...
View ArticleHow to modify Gradient in a state's PropertyChange?
I have a Rectangle with the following gradient: gradient: Gradient { GradientStop { position: 0; color:...
View ArticleHow to get mouse click event on widget component
Hi, Does your C++ widgets send mouse signal ? If so try to catch it. It is an idéal i have not yet zone a customn widget from C++ Sincerely
View ArticleTesting Calendar QML object in Qt5.3 RC
Hi guys… i need to change the language of the Calendar component in qt5.3 because i need to put them in spanish… can I do that ?? how my friends ?? thanks to all of you best regards freddy
View ArticleBold text disappears when changing translation and default font
I am trying to change the language translations dynamically, using something like: if (lang == "en") { if (translator) ...
View ArticleHow to preserve TextField binding when user manually edits value
I’m trying to understand the proper way to use QtQuick with C++. I created some simple QML in a file. I’m winnowing it down for this post, the relevant part looks like this ColumnLayout { ...
View Article[SOLVED] Crash of app when exchanging objects from C++ to QML
Dear all, I’m using Qt 5.2.1 for developing an app on iOS. In the app there is a C++ part that provides various objects (registered with qmlRegisterType) to the QML part where the data of such objects...
View ArticleUsage of setContextProperty
Hello, I have used a QString variable inside setContextProperty, but it says that “must be a string literal to be available in the QMl editor”. example: QString strQmlObjName =...
View Article[SOLVED] Crash of app when exchanging objects from C++ to QML
I solved setting the parent of TraitObject to the C++ object that creates and maintains it. In this way, the QML does not take ownership because it see that has a parent and it suppose that the parent...
View ArticleHow to set the frame rate of camera preview in QT
I am using QAbstractVideoSurface for rendering the preview using QCamera class. I want to set the camera streaming frame rate as 30pfs. How I can set the frame rate? Any one give idea its very helpful.
View ArticleIs there a way to show native right-click context menu in TextField and...
The gallery example creates its own context menu for TextArea. But are there ready-made native context menu for TextField and TextArea? Or do I need to create reusable components with context menu?
View Article