qt5

How can set pop-up menu position in QML

北城以北 提交于 2021-01-03 07:10:16
问题 I want to fix the position of pop-up menu in QML. When I click on a setting button,I want the pop-up menu will display at the fixed position. I did it by a day but can't. How can I do it in QML. Also, I want to change the size of menu item(width and Height). Hope your help! 回答1: That depends on QtQuick.Controls version. In 2.0 you can define size and position(and even more - you must do) import QtQuick 2.7 import QtQuick.Controls 2.0 //import QtQuick.Controls 1.4 import QtQuick.Window 2.0

How can set pop-up menu position in QML

岁酱吖の 提交于 2021-01-03 07:08:59
问题 I want to fix the position of pop-up menu in QML. When I click on a setting button,I want the pop-up menu will display at the fixed position. I did it by a day but can't. How can I do it in QML. Also, I want to change the size of menu item(width and Height). Hope your help! 回答1: That depends on QtQuick.Controls version. In 2.0 you can define size and position(and even more - you must do) import QtQuick 2.7 import QtQuick.Controls 2.0 //import QtQuick.Controls 1.4 import QtQuick.Window 2.0

How can set pop-up menu position in QML

旧巷老猫 提交于 2021-01-03 07:08:02
问题 I want to fix the position of pop-up menu in QML. When I click on a setting button,I want the pop-up menu will display at the fixed position. I did it by a day but can't. How can I do it in QML. Also, I want to change the size of menu item(width and Height). Hope your help! 回答1: That depends on QtQuick.Controls version. In 2.0 you can define size and position(and even more - you must do) import QtQuick 2.7 import QtQuick.Controls 2.0 //import QtQuick.Controls 1.4 import QtQuick.Window 2.0

How can set pop-up menu position in QML

时光怂恿深爱的人放手 提交于 2021-01-03 07:07:49
问题 I want to fix the position of pop-up menu in QML. When I click on a setting button,I want the pop-up menu will display at the fixed position. I did it by a day but can't. How can I do it in QML. Also, I want to change the size of menu item(width and Height). Hope your help! 回答1: That depends on QtQuick.Controls version. In 2.0 you can define size and position(and even more - you must do) import QtQuick 2.7 import QtQuick.Controls 2.0 //import QtQuick.Controls 1.4 import QtQuick.Window 2.0

How can set pop-up menu position in QML

僤鯓⒐⒋嵵緔 提交于 2021-01-03 07:07:25
问题 I want to fix the position of pop-up menu in QML. When I click on a setting button,I want the pop-up menu will display at the fixed position. I did it by a day but can't. How can I do it in QML. Also, I want to change the size of menu item(width and Height). Hope your help! 回答1: That depends on QtQuick.Controls version. In 2.0 you can define size and position(and even more - you must do) import QtQuick 2.7 import QtQuick.Controls 2.0 //import QtQuick.Controls 1.4 import QtQuick.Window 2.0

How can set pop-up menu position in QML

南笙酒味 提交于 2021-01-03 07:07:23
问题 I want to fix the position of pop-up menu in QML. When I click on a setting button,I want the pop-up menu will display at the fixed position. I did it by a day but can't. How can I do it in QML. Also, I want to change the size of menu item(width and Height). Hope your help! 回答1: That depends on QtQuick.Controls version. In 2.0 you can define size and position(and even more - you must do) import QtQuick 2.7 import QtQuick.Controls 2.0 //import QtQuick.Controls 1.4 import QtQuick.Window 2.0

How to center dialog on screen in QtQuick Controls 2?

此生再无相见时 提交于 2021-01-02 05:31:35
问题 All my dialogs appear on the top left corner of screen instead of the center. What is the best way to let the dialogs be placed automatically correct? import QtQuick 2.7 import QtQuick.Controls 2.2 ApplicationWindow { id: mainWindow visible: true width: 640 height: 480 title: qsTr("Hello World") Component.onCompleted: { showMessageBox('Hey this actually works!'); } function showMessageBox(message) { var component = Qt.createComponent("MessageDialog.qml") if(component.status == Component.Ready

Qt GUI theme looks old-fashioned

﹥>﹥吖頭↗ 提交于 2020-12-29 05:20:25
问题 When I cross-compile Qt 5.8.0 from source myself and use it to build the Qt "Dynamic Layouts" example from Qt Widgets for Microsoft Windows, it looks old-fashioned, as if it were running on Windows 2000, as shown in the left window below. However, if I compile the exact same program using the pre-built mingw-w64-x86_64-qt5-static package (version 5.8.0-1) from MSYS2, it looks like a nice modern Windows application, as shown in the right window below. How can I fix my version of Qt so that

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

谁说我不能喝 提交于 2020-12-15 05:02:02
问题 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

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

老子叫甜甜 提交于 2020-12-15 05:01:45
问题 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