qt5

Send data to Qt application(Laptop) from Android using UDP

爷,独闯天下 提交于 2020-12-15 05:01:13
问题 In my Qt5 application, I'm trying to implement UDP : port = _M_PORT; socket = new QUdpSocket(this); //socket->bind(QHostAddress("192.168.0.100"),port); socket->bind(QHostAddress("192.168.0.108"),port); connect(socket,SIGNAL(readyRead()),this,SLOT(readyRead())); Also tried : socket = new QUdpSocket(this); socket->connectToHost("192.168.0.108",port); socket->bind(port); IP address of my PC is 192.168.0.108 and IP address of my Android phone is 192.168.0.100 . I'm reading datagrams from UDP like

Could not load the Qt platform plugin “xcb” in “” even though it was found

落爺英雄遲暮 提交于 2020-12-10 09:32:54
问题 This question is asked several times in Stack Overflow. I tried methods in several discussions but it didn't work. So my OpenCV library which was built with custom Qt doesn't work properly: import cv2 img = cv2.imread("IMAGE_PATH") cv2.imshow("frame", img) qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. Available

Could not load the Qt platform plugin “xcb” in “” even though it was found

时光总嘲笑我的痴心妄想 提交于 2020-12-10 09:32:32
问题 This question is asked several times in Stack Overflow. I tried methods in several discussions but it didn't work. So my OpenCV library which was built with custom Qt doesn't work properly: import cv2 img = cv2.imread("IMAGE_PATH") cv2.imshow("frame", img) qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. Available

Could not load the Qt platform plugin “xcb” in “” even though it was found

萝らか妹 提交于 2020-12-10 09:29:23
问题 This question is asked several times in Stack Overflow. I tried methods in several discussions but it didn't work. So my OpenCV library which was built with custom Qt doesn't work properly: import cv2 img = cv2.imread("IMAGE_PATH") cv2.imshow("frame", img) qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. Available

Could not load the Qt platform plugin “xcb” in “” even though it was found

橙三吉。 提交于 2020-12-10 09:28:28
问题 This question is asked several times in Stack Overflow. I tried methods in several discussions but it didn't work. So my OpenCV library which was built with custom Qt doesn't work properly: import cv2 img = cv2.imread("IMAGE_PATH") cv2.imshow("frame", img) qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. Available

QML Connections: Implicitly defined onFoo properties in Connections are deprecated

China☆狼群 提交于 2020-12-05 00:51:45
问题 I got the following error message when upgraded to Qt 5.15: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... } The corresponding QML code is pasted below Connections { target: AppProxy onLogsReady: function(logs) { textLogs.text = logs } } where the onLogsReady is a signal defined in the AppProxy class: class AppProxy : public QObject { Q_OBJECT Q_DISABLE_COPY(AppProxy) public: AppProxy(QObject*

QML virtual keyboard dimensions

南楼画角 提交于 2020-12-02 08:09:39
问题 I'm having trouble finding the dimensions for the virtual keyboard. Here's an example: Rectangle { Component.onCompleted: { Qt.inputMethod.visibleChanged.connect(resizeForKeyboard) } Component.onDestruction: { Qt.inputMethod.visibleChanged.disconnect(resizeForKeyboard) } function resizeForKeyboard(){ console.log('Visibility changed!!!'); var keys = Object.keys(Qt.inputMethod.keyboardRectangle); var rect = Qt.inputMethod.keyboardRectangle; //A simple script I have for debugging, this loops /

QML virtual keyboard dimensions

删除回忆录丶 提交于 2020-12-02 08:08:18
问题 I'm having trouble finding the dimensions for the virtual keyboard. Here's an example: Rectangle { Component.onCompleted: { Qt.inputMethod.visibleChanged.connect(resizeForKeyboard) } Component.onDestruction: { Qt.inputMethod.visibleChanged.disconnect(resizeForKeyboard) } function resizeForKeyboard(){ console.log('Visibility changed!!!'); var keys = Object.keys(Qt.inputMethod.keyboardRectangle); var rect = Qt.inputMethod.keyboardRectangle; //A simple script I have for debugging, this loops /

How to change the font color of a MenuBar?

落爺英雄遲暮 提交于 2020-12-01 11:00:18
问题 How can I change the text color of the menu items of a QML MenuBar ? import QtQuick 2.4 import QtQuick.Controls 1.3 import QtQuick.Window 2.2 import QtQuick.Dialogs 1.2 import QtQuick.Controls.Styles 1.3 as QtQuickControlStyle ApplicationWindow { title: qsTr("Test") width: 640 height: 480 visible: true property color menuBackgroundColor: "#3C3C3C" property color menuBorderColor: "#282828" menuBar: MenuBar { style: QtQuickControlStyle.MenuBarStyle { padding { left: 8 right: 8 top: 3 bottom: 3

How to change the font color of a MenuBar?

允我心安 提交于 2020-12-01 10:57:43
问题 How can I change the text color of the menu items of a QML MenuBar ? import QtQuick 2.4 import QtQuick.Controls 1.3 import QtQuick.Window 2.2 import QtQuick.Dialogs 1.2 import QtQuick.Controls.Styles 1.3 as QtQuickControlStyle ApplicationWindow { title: qsTr("Test") width: 640 height: 480 visible: true property color menuBackgroundColor: "#3C3C3C" property color menuBorderColor: "#282828" menuBar: MenuBar { style: QtQuickControlStyle.MenuBarStyle { padding { left: 8 right: 8 top: 3 bottom: 3