qt5.3

Generate mouse events using Qt framework

做~自己de王妃 提交于 2020-01-05 10:10:52
问题 I am using Qt framework and I would like to generate mouse events outside my application window. So far I managed to move the mouse pointer using: QGuiApplication::overrideCursor()->setPos(x,y); How can I also generate left mouse button click, middle button click, right button click and mouse wheel movement? 回答1: A few years ago i wrote a drivers for GUI testing (for mouse and keyboard). Drivers are developed for Windows, Linux and MacOS X. You can look at here. There is a OS depended

Generate mouse events using Qt framework

两盒软妹~` 提交于 2020-01-05 10:10:41
问题 I am using Qt framework and I would like to generate mouse events outside my application window. So far I managed to move the mouse pointer using: QGuiApplication::overrideCursor()->setPos(x,y); How can I also generate left mouse button click, middle button click, right button click and mouse wheel movement? 回答1: A few years ago i wrote a drivers for GUI testing (for mouse and keyboard). Drivers are developed for Windows, Linux and MacOS X. You can look at here. There is a OS depended

Porting App from Qt 4.8 to Qt 5.3 getting “ DSO missing from command line”

偶尔善良 提交于 2020-01-05 09:34:43
问题 I built this project on qt 4.8 ubuntu 12.04(working) and now building it on qt 5.3 ubuntu 14.04 . I am getting following error while compiling error: mainwindow.o: undefined reference to symbol '_ZN12QtConcurrent16ThreadEngineBase16setProgressValueEi' error: error adding symbols: DSO missing from command line /usr/lib/x86_64-linux-gnu/libQtCore.so.4: .pro file QT += serialport QT += widgets QT += network QT += core ... ... LIBS += "/usr/lib/x86_64-linux-gnu/libqjson.so.0" no Idea what to do .

Porting App from Qt 4.8 to Qt 5.3 getting “ DSO missing from command line”

时光总嘲笑我的痴心妄想 提交于 2020-01-05 09:31:45
问题 I built this project on qt 4.8 ubuntu 12.04(working) and now building it on qt 5.3 ubuntu 14.04 . I am getting following error while compiling error: mainwindow.o: undefined reference to symbol '_ZN12QtConcurrent16ThreadEngineBase16setProgressValueEi' error: error adding symbols: DSO missing from command line /usr/lib/x86_64-linux-gnu/libQtCore.so.4: .pro file QT += serialport QT += widgets QT += network QT += core ... ... LIBS += "/usr/lib/x86_64-linux-gnu/libqjson.so.0" no Idea what to do .

How to hide a QML Window when opening a other QML Window

喜夏-厌秋 提交于 2020-01-05 02:57:42
问题 I need to hide The QML Window when opening the another QML Window while clicking the button,I use Loader to open the another QML Window and its only hide the QML form components not QML Window,but I currently use window component to opens the QML Window Here is my code : Button { id: button2 x: 19 y: 54 width: 114 height: 25 text: qsTr("DIFF-R") style: ButtonStyle { background: Rectangle { implicitWidth: 10 implicitHeight: 25 border.width: control.activeFocus ? 2 : 1 border.color: "#555"

QDir::exists with mapped remote directory

自闭症网瘾萝莉.ら 提交于 2019-12-24 15:06:57
问题 I use QDir::exists to check directories. However, when the checked directory name (string) points to mapped network directory which is not available, then the function takes pretty long (up to 10secs and longer) to return. How could I realize a shorter timeout? Or is there anything better to check? 来源: https://stackoverflow.com/questions/27511809/qdirexists-with-mapped-remote-directory

Animate snap in ListView

核能气质少年 提交于 2019-12-11 04:14:10
问题 I would like to animate the "snap" effect when a ListView snaps to a specific item. I enable "snapping" with the snapMode: ListView.SnapOneItem property. Currently it just de-accelerates to the current item and stops, but it would be nice if I could get it to make a "bounce" effect when it stops. Any ideas about how I can do this? Flickable has a rebound property, but this seems to not work for the snapping on elements inside a ListView . 回答1: Since you used SnapOneItem , you can insert a

Not possible to hide a QMenu object QMenu::setVisible()?

最后都变了- 提交于 2019-12-08 15:53:45
问题 I have built up a QMenu MainMenu on top of my MainWindow in my application. As everybody is used to it, I have following QMenu Main menus: File - Edit - SuperHeavyExpertMenus - Settings - Help I would like to hide the sub tree SuperHeaverExpertMenus initially, on program start, because it conatins a lot of settings, which might confuse beginner users. I want to show that sub tree with SuperHeavyExpertMenu , when a checkbox in Settings is true, for instance. I can hide the children QActions of

How to set a different background-color to a disabled button with QSS?

你。 提交于 2019-12-07 15:29:06
问题 I have already tried to use disabled and !enabled but it doesn't work. Here is my QSS code : QPushButton { background-color:#44c767; border-radius:5px; border:1px solid #18ab29; color:#ffffff; font-family:arial; font-size:15px; font-weight:bold; text-decoration:none; padding-right:10px; outline: 0; } QPushButton:hover:!pressed { background-color:#54d777; } QPushButton: pressed { background-color:#30b252; } QPushButton: disabled { background-color:#ff0000; } QPushButton: !enabled { background

How to set a different background-color to a disabled button with QSS?

南笙酒味 提交于 2019-12-06 02:31:47
I have already tried to use disabled and !enabled but it doesn't work. Here is my QSS code : QPushButton { background-color:#44c767; border-radius:5px; border:1px solid #18ab29; color:#ffffff; font-family:arial; font-size:15px; font-weight:bold; text-decoration:none; padding-right:10px; outline: 0; } QPushButton:hover:!pressed { background-color:#54d777; } QPushButton: pressed { background-color:#30b252; } QPushButton: disabled { background-color:#ff0000; } QPushButton: !enabled { background-color:#ff0000; } The documentation refers to a disabled pseudo state but without providing more