qt

How would I go about making a overlay widget

人走茶凉 提交于 2021-02-11 13:01:42
问题 How would I go about making a overlay widget with qt? I've considered using a QPaintEvent or a QGraphicsScene, but I want to be able to add widgets and for the widget to not occupy space in a layout, causing other widgets to shift when the popup appears. 回答1: I believe the best solution is to parent the so called overlay widget to the window or even have the overlay widget be in its own window. The first solution might be easier to do, but the overlay widget is bound to the inside of the

Qt 5.3 QWidget::paintEngine : Should no longer be called

这一生的挚爱 提交于 2021-02-11 12:59:05
问题 I'm moving my code from a Qt 4.x to Qt 5.3 and I am running into a weird Qt warning shown in the command prompt. There are no errors or anything but the command prompt will show the following: QWidget::paintEngine: Should no longer be called QPainter::begin: Paint device returned engine == 0, type: 1 QPainter::setClipRegion: Painter not active QPainter::setClipRect: Painter not active I believe I narrowed it down to one class: Header: #pragma once #include <QtCore\qmetaobject.h> #include

Editing a QVariantMap from QML

久未见 提交于 2021-02-11 12:56:58
问题 I have a QVariantMap created in C++ from a JSON object and I want to update this object from QML. I set it as a context property. // main.cpp engine.rootContext()->setContextProperty("myjson", myqvariantmap); In QML I tried updating its properties but it seems to be read-only. The docs support this, saying Mind that QVariantList and QVariantMap properties of C++ types are stored as values and cannot be changed in place by QML code. You can only replace the whole map or list, but not

Qt 5.3 QWidget::paintEngine : Should no longer be called

时间秒杀一切 提交于 2021-02-11 12:56:54
问题 I'm moving my code from a Qt 4.x to Qt 5.3 and I am running into a weird Qt warning shown in the command prompt. There are no errors or anything but the command prompt will show the following: QWidget::paintEngine: Should no longer be called QPainter::begin: Paint device returned engine == 0, type: 1 QPainter::setClipRegion: Painter not active QPainter::setClipRect: Painter not active I believe I narrowed it down to one class: Header: #pragma once #include <QtCore\qmetaobject.h> #include

Implement a cancel button with Qt in python

自闭症网瘾萝莉.ら 提交于 2021-02-11 12:41:50
问题 This question is probably dumb, but to give some background: I have been given a bunch of code of a software whose GUI is written in Qt, and I have been told that I should improve it by implement multithreading so the interface doesn't freeze (I have a bunch of code written like that that I am using as a template). I am not familiar with Qt or GUIs in general. ATM I am trying to implement a simple cancel button: as the process in the background might take long, I want to be able to stop it

How to install libusb?

强颜欢笑 提交于 2021-02-11 12:41:01
问题 I am having hard time installing libusb. I went across some YouTube videos, and they were talking about "INSTALLING" libusb. I went across another tutorial and they are saying we need to build it "manually". However, I downloaded libusb from http://sourceforge.net/projects/libusb-win32/files/. In my download, there is no software to install (according to video, it is libusb_win32.exe). My OS is Windows 7 Ultimate 32 bit. The PC is a Dell Inspiron 4030 (I need to install this in my desktop PC

qt when mouse move to the windows taskbar give tips on the top thumbnail

泪湿孤枕 提交于 2021-02-11 12:24:05
问题 when I move the mouse over the program icon in the taskbar at the bottom of the Windows, there will be text info on the top of thumbnail. I didn't find qt doc. Also want to try to use mfc are not resolved. 来源: https://stackoverflow.com/questions/63239094/qt-when-mouse-move-to-the-windows-taskbar-give-tips-on-the-top-thumbnail

How to manage separate GUI processes in a Qt application?

心不动则不痛 提交于 2021-02-11 12:23:38
问题 How would a Qt GUI application start separate GUI applications in different processes and managed their windows? Let's say I have a Qt application call myApp. The user is able to launch external application available on the OS from within myApp that run in their own separate process. I know about QProcess, but the difficult part that I haven't been able to figure out is managing the windows. myApp will need to have it's own title bars for windows and also be cross platform. If I launch an

How to manage separate GUI processes in a Qt application?

邮差的信 提交于 2021-02-11 12:18:10
问题 How would a Qt GUI application start separate GUI applications in different processes and managed their windows? Let's say I have a Qt application call myApp. The user is able to launch external application available on the OS from within myApp that run in their own separate process. I know about QProcess, but the difficult part that I haven't been able to figure out is managing the windows. myApp will need to have it's own title bars for windows and also be cross platform. If I launch an

Changing Background color of window on button click in qml

浪尽此生 提交于 2021-02-11 12:17:26
问题 I developing qml project in that i want to add functionality of changing background color .. for that i create one combo box with items {red,blue,white} and create one update button to update color when user select red item and click on update background color change as red so how can i do ?? Button { id: button1 x: 284 y: 95 width: 114 height: 34 text: qsTr("Update") contentItem: Text { font: control.font opacity: enabled ? 1.0 : 0.3 text: "Update" //Font.pixelSize:15 horizontalAlignment: