qt5

QT WebGL-stream, virtualKeyboard and touch screen problem

让人想犯罪 __ 提交于 2021-02-08 07:41:52
问题 As I see, the virtualKeyboard (plugin) sends touch and click event when qml application is running over WegGL-stream. Now I've trouble finding an easy workaround.. Does anyone have a good idea? Further is it a virtualKeyboard or a QPA-Plugin bug? Tried with QT 5.13.0, MSVC2017 64Bit / MinGW 64Bit compiler, Windows10, Chrome 76.0.3809.132 64Bit / Firefox. If application is not running over WebGL-stream, everthing works fine in terms of touch and click events. // Tests with QT Quick Virtual

QT5 Bluetooth - scanning at regular intervals freezes the program

自作多情 提交于 2021-02-08 07:32:40
问题 I am currently using QT5 (c++) for implementing a bluetooth scanner which searches for all available devices in detection range. The program is running on a Raspberry PI 3, without a GUI (command line only). The routine seems to work fine at first (3+ hours without issues). Then, after a seemingly random amount of repetitions, the bluetooth search doesn't find any device, even if they are physically there. After this happens, the program doesn't respond to system signals anymore, the program

QT5 Bluetooth - scanning at regular intervals freezes the program

落爺英雄遲暮 提交于 2021-02-08 07:32:05
问题 I am currently using QT5 (c++) for implementing a bluetooth scanner which searches for all available devices in detection range. The program is running on a Raspberry PI 3, without a GUI (command line only). The routine seems to work fine at first (3+ hours without issues). Then, after a seemingly random amount of repetitions, the bluetooth search doesn't find any device, even if they are physically there. After this happens, the program doesn't respond to system signals anymore, the program

DropArea doesn't notify about actions onEntered, onExited, onDropped

假装没事ソ 提交于 2021-02-08 06:33:27
问题 I have Rectangle filled with MouseArea which on onPressAndHold() handler reveals second Rectangle and transfers drag action to that Rectangle . The problem is that when I move that second Rectangle over DropArea it doesn't notify about any actions ( onEntered , onExited , onDropped ). I tried to do this in many combinations but it has never worked. Here is an example, am I missing something? import QtQuick 2.0 import QtQuick.Window 2.0 Window { id: appDrawerRoot visible: true width: 360;

DropArea doesn't notify about actions onEntered, onExited, onDropped

微笑、不失礼 提交于 2021-02-08 06:33:24
问题 I have Rectangle filled with MouseArea which on onPressAndHold() handler reveals second Rectangle and transfers drag action to that Rectangle . The problem is that when I move that second Rectangle over DropArea it doesn't notify about any actions ( onEntered , onExited , onDropped ). I tried to do this in many combinations but it has never worked. Here is an example, am I missing something? import QtQuick 2.0 import QtQuick.Window 2.0 Window { id: appDrawerRoot visible: true width: 360;

Deploy Qt 5 QML application to a real Android device

眉间皱痕 提交于 2021-02-08 06:16:33
问题 There are many tutorials how to build an application with Qt for Android. So I do it in these steps: Installed Android SDK, NDK, JDK and Apache Ant Installed Qt 5.2 for Android Created simple QML application. Configured virtual device from AVD Manager I tried to run it and it bringed up Emulator window with my app. OK, it is going as expected. Now I want to run it on real device. I have Samsung Galaxy Tab 2 10.1 P5100 so I enabled USB debug and connected it to PC. But when I run the

Deploy Qt 5 QML application to a real Android device

谁说胖子不能爱 提交于 2021-02-08 06:15:07
问题 There are many tutorials how to build an application with Qt for Android. So I do it in these steps: Installed Android SDK, NDK, JDK and Apache Ant Installed Qt 5.2 for Android Created simple QML application. Configured virtual device from AVD Manager I tried to run it and it bringed up Emulator window with my app. OK, it is going as expected. Now I want to run it on real device. I have Samsung Galaxy Tab 2 10.1 P5100 so I enabled USB debug and connected it to PC. But when I run the

QML Model data by index

早过忘川 提交于 2021-02-07 20:54:10
问题 I have QAbstractListModel based model... class RecordModel : public QAbstractListModel { ... }; QQmlContext *ctxt = engine.rootContext(); ctxt->setContextProperty("recordModel", &model); // QML recordModel.get(0).name // now work How to get a model data by index and role name? ... Solution : // C++ class RecordModel : public QAbstractListModel { Q_OBJECT Q_ENUMS(Roles) public: // ... Q_INVOKABLE QVariant data(int i, int role) const { return data(index(i, 0), role); } }; // QML recordModel

QML Model data by index

杀马特。学长 韩版系。学妹 提交于 2021-02-07 20:53:01
问题 I have QAbstractListModel based model... class RecordModel : public QAbstractListModel { ... }; QQmlContext *ctxt = engine.rootContext(); ctxt->setContextProperty("recordModel", &model); // QML recordModel.get(0).name // now work How to get a model data by index and role name? ... Solution : // C++ class RecordModel : public QAbstractListModel { Q_OBJECT Q_ENUMS(Roles) public: // ... Q_INVOKABLE QVariant data(int i, int role) const { return data(index(i, 0), role); } }; // QML recordModel

Using QFileSystemModel with ListView

本秂侑毒 提交于 2021-02-07 19:04:58
问题 I'm trying to create a simple ListView that I can use to browse the file system, using QFileSystem . First, I tried to use code I've found that worked for QDirModel: main.qml: ListView { id: list width: 300 height: 500 model: DelegateModel { model: myFileModel delegate: Text{ id: txt text: fileName MouseArea { anchors.fill: parent onClicked: { //Switch directory when clicked list.model.rootIndex = list.model.modelIndex(index); } } } } main.cpp: int main(int argc, char *argv[]) { QApplication