Quantcast
Channel: Jobs
Viewing all 18427 articles
Browse latest View live

Which module/library to play a wav file at varying frequencies?

$
0
0
Hello! I’ve been playing with Qt for a month or so, converting a few programs I’ve written in various older programming languages. Mostly it’s been fairly simple, but I’ve gotten stuck and am just going in circles on this. Basically, I have some .wav file samples of an old sound chip, that need to play at varying frequencies. While I’ve found it’s simple enough to play a .wav file as-is with either QSound, or using Audio from QtMultimedia; adjusting the frequency is another matter. I’ve tried a couple different things with no success: I thought I might be able to use QtAudioEngine with Sound and PlayVariation, but using “import QtAudioEngine 1.0” gives me a wavy red line with: “QML module not installed”. Attempting to build the project gives the error: module “QtAudioEngine” is not installed Thinking it might be an installation/update/version problem ( I was on 5.2.0 at the time ), I tried uninstalling Qt and downloaded the Qt 5.2.1 for Windows 32-bit (VS 2010, OpenGL, 517 MB) from the downloads page, and tried to reinstall, but I’m still getting the same errors. Do I need to download it from somewhere else, or maybe I’m missing a dependency? I’ve seen no other errors during the installs, and every other module I’ve used seems to be working. Stuck at that point, I figured I’d try Phonon, since it looked like that would do what I wanted. However, with the recent removal from Qt itself, documentation on how to build/install/use the new phonon4qt5 is pretty much non-existent, everything I could find pointing to old or deleted pages. I downloaded the phonon source, as well as cmake; and eventually seemed to get it to run, and compile with MSVC2010, but it did not install into the Qt directory structure, and I have no idea what files need to be where, or even if it was built properly. The KDE site doesn’t really help, since it’s mostly under construction and there’s very little about using Phonon with windows. I guess since it’s in wav file format I could convert it to raw data, resample, and use it with QAudioOutput, but I’d rather use an existing solution and not re-invent the wheel unless I really need to. Anyway, any help on the above, or suggestions/links to any other library/module that would work would be greatly appreciated. Thanks!

Unable to scroll horizontally in QListView

$
0
0
I have a QListView with isWrapping set to true, and I am unable to scroll horizontally unless my mouse cursor is directly on the scrollbar.

Customizing QProgressBar

$
0
0
Hi, I’m trying customize a QProgressBar on a custom QFrame, the background of the QFrame is black and when I create and show the progressbar its background color is the color from the Desktop so I have a grey rectangle on a black background, I’ve tried everhthing from trying to make it transparent to using style sheets, can anyone point me in the right direction of customizing the background of the progressbar? Thanks

Qt 5.2.1 android app build error : Files\Android\android-ndk-r9c/platforms/android-9/arch-arm/: No such file or directory

$
0
0
Hi all Trying for the fisrt time to build and run an app on an android simulator, i’m facing folowing error from the compiler : error: Files\Android\android-ndk-r9c/platforms/android-9/arch-arm/: No such file or directory I’m building on windows 7, with mingw. My qt version is 5.2.1. Apparently the compiler is looking for some files in this special path, which is not correct. I did not manage to find where to configure it. Does anyone have an idea ? Thanks in advance for your help, regards MK

Tree model Table view

$
0
0
Hi, QListView offers function setRootIndex to move between nodes, if is way to use something similar in qml table view ?

Error installing Qt3D with QtCreator and qt5

$
0
0
I tried to install Qt3D using QtCreator 5.1.1 on Windows 8, and I can’t figure out how to succeed. First, I followed the steps given in the documentation: get the sources on git://gitorious.org/qt/qt3d open the .pro in QtCreator add the “install” and “-j 3” arguments to the make command When I build the project, I get the following error:         In file included from D:\qt3D\project\qt-qt3d\src\threed\global\qglnamespace.cpp:42:0:         D:\qt3D\project\qt-qt3d\src\threed\global\qglnamespace.h:45:29: fatal error: Qt3D/qt3dglobal.h: No such file or directory          #include <Qt3D/qt3dglobal.h>                                      ^         compilation terminated.         Makefile.Debug:2547: recipe for target '.obj/debug_shared/qglnamespace.o' failed         mingw32-make[3]: *** [.obj/debug_shared/qglnamespace.o] Error 1         mingw32-make[3]: Leaving directory 'D:/qt3D/project/release/src/threed'         Makefile:38: recipe for target 'debug-all' failed         mingw32-make[2]: Leaving directory 'D:/qt3D/project/release/src/threed'         Makefile:40: recipe for target 'sub-threed-make_first-ordered' failed         mingw32-make[1]: Leaving directory 'D:/qt3D/project/release/src'         makefile:43: recipe for target 'sub-src-make_first' failed         mingw32-make[2]: *** [debug-all] Error 2         mingw32-make[1]: *** [sub-threed-make_first-ordered] Error 2         mingw32-make: *** [sub-src-make_first] Error 2         15:07:03: Le processus "C:\Qt\Qt5.1.1\Tools\mingw48_32\bin\mingw32-make.exe" s'est terminé avec le code 2.        Erreur lors de la compilation/déploiement du projet qt3d (kit : Desktop Qt 5.1.1 MinGW 32bit)        Lors de l'exécution de l'étape "Make" So I created the following folders into the folder “C:\Qt\Qt5.1.1\5.1.1\mingw48_32\include”: Qt3D: I copied there all .h files located into subfolders of the src/threed folder of the qt3d sources Qt3DQuick: I copied there all .h files located into the src/quick3d folder of the qt3d sources I re-run the compilation, and then I got the following errors:         D:\qt3D\project\qt-qt3d\src\quick3d\qquickeffect.cpp:44:24: fatal error: qglpainter.h: No such file or directory          #include "qglpainter.h"                                 ^         compilation terminated.         Makefile.Release:810: recipe for target '.obj/release_shared/qquickeffect.o' failed         mingw32-make[3]: *** [.obj/release_shared/qquickeffect.o] Error 1         mingw32-make[3]: *** Waiting for unfinished jobs....         D:\qt3D\project\qt-qt3d\src\quick3d\qquickitem3d.cpp:47:32: fatal error: qgllightparameters.h: No such file or directory          #include "qgllightparameters.h"                                         ^         compilation terminated.         D:\qt3D\project\qt-qt3d\src\quick3d\qquickmesh.cpp:44:30: fatal error: qglabstractscene.h: No such file or directory          #include "qglabstractscene.h"                                       ^         compilation terminated.         Makefile.Release:949: recipe for target '.obj/release_shared/qquickitem3d.o' failed         mingw32-make[3]: *** [.obj/release_shared/qquickitem3d.o] Error 1         Makefile.Release:1053: recipe for target '.obj/release_shared/qquickmesh.o' failed         mingw32-make[3]: *** [.obj/release_shared/qquickmesh.o] Error 1         mingw32-make[3]: Leaving directory 'D:/qt3D/project/release/src/quick3d'         mingw32-make[2]: *** [release-install] Error 2         Makefile:58: recipe for target 'release-install' failed         mingw32-make[2]: Leaving directory 'D:/qt3D/project/release/src/quick3d'         Makefile:107: recipe for target 'sub-quick3d-install_subtargets-ordered' failed         mingw32-make[1]: Leaving directory 'D:/qt3D/project/release/src'         mingw32-make[1]: *** [sub-quick3d-install_subtargets-ordered] Error 2         makefile:55: recipe for target 'sub-src-install_subtargets' failed         mingw32-make: *** [sub-src-install_subtargets] Error 2         15:18:09: Le processus "C:\Qt\Qt5.1.1\Tools\mingw48_32\bin\mingw32-make.exe" s'est terminé avec le code 2.        Erreur lors de la compilation/déploiement du projet qt3d (kit : Desktop Qt 5.1.1 MinGW 32bit)        Lors de l'exécution de l'étape "Make" So, I tried to copy all needed .h file into sources folders where they are needed, but I didn’t work. Moreover, I think there must be another way to get what I want, but I can’t see how. I someone could help me, I would be glad. Thanks, Lauriane

Has anybody tried the new 'QAbstractItemModel::moveRow(...)' in Qt5 already?

$
0
0
There is a new function in Qt5: bool QAbstractItemModel::moveRow(const QModelIndex & sourceParent, int sourceRow, const QModelIndex & destinationParent, int destinationChild) Has anybody tried it already and was successful? The doc file says: “On models that support this, moves sourceRow from sourceParent to destinationChild under destinationParent.” but nothing about which models are supporting this function. I’ve tried it with tableModel->moveRow ( tableView->currentIndex(),                                         tableView->currentIndex().row(),                                         tableView->currentIndex(),                                         tableView->currentIndex().row() +2 ); No problem to compile but when I’m calling this function with qDebug(), it returns ‘false’ only and that’s all. Any ideas?

Unable to disable/grey QAction item which is part of QMenu in Qt 4.8.4

$
0
0
Hi All, I am creating a QMenu with a set of QAction items as menuitems. My intention is to disable one of the menu items. I am using QAction’s setEnabled(false) to disable the item but I find that the action item text is not greying out at all. QMenu *contextual_menu = QMenu(this); QAction *car =  contextual_menu ->addAction(QString("car")); QAction *bus =  contextual_menu ->addAction(QString("bus")); car->setEnabled(false); QAction* selected_item = contextual_menu ->exec(QCursor::pos()); My expectation is that the action item “car” should be displayed in greyed state which is not happening, although clicking on it does not return the selected item but clicking on “bus” returns the selected item. Can smeone pls let me know whats the possible flaw in my code? I find it very amusing and baffling that such simple code didn’t yield the desired result. any help is appreciated.

imx53 & Qt5.2 & gstreamer & HW accelerator

$
0
0
Hi all Hi i tried to run qt qml example from qt 5.2 on imx53 board with gstreamer support. Our system modules:ltib/imx53/x11/qt5.2 i encountered the following issues when doing that: 1 – When i play video with: gst-lunch palybin2 “file” , the results are ok. The playbin2 finds and uses the relevant plugins for the gstreamer with the vpu. 2 – When i run the video example from Qt 5.2 , i see that the performance is very poor, and it can play Only mp4 format. 3 – i saw that the lib qt5multimedia do not use the Freescale plugin/element mfw_v4lsink plugin -> poor performance. 4 – i also check this patch for qt 4: Freescale patch: “Qt phonon gstreamer backend for imx53” https://community.freescale.com/thread/277496. didnt find similer patch for qt 5. 5 – When i tried to patch the Qt5 multimedia lib to force work with mfw_v4lsink it ends up with good performance but with full screen view “outside the Qt application world”. of course it’s not good solution. Did any one successed to run the qt 5 video example with the freescale HW accelrator?

QMenubar::resizeevent is not called when i add menu in existing menubar

$
0
0
Hi , i am adding the extra menu on the existing menubar but after that the resizeevent of QMenubar is not called. currently i am porting my application from qt 3.0 to qt 4.8 . in qt 3.0 it works fine and resize event called properly when i add menu in existing menubar. so my question is will the resize event of QMenubar will call if i add extra menu in that? Thanks, Yogesh

How can I view PDF files on QML (QtQuick 2) ?

$
0
0
How can I view PDF files on QML (QtQuick 2) ?

Error when linking libnative_camera_r2.2.0.so - QT + OpenCV4Android

$
0
0
Hi, I’ve been trying to run OpenCV4Android 2.4.8 along with QT 5.2 to create an android app, but I got stuck with the following error when deploying the app: /dalvikvm(16441): dlopen("/data/app-lib/org.app-1/libnative_camera_r2.2.0.so") failed: Cannot load library: soinfo_relocate(linker.cpp:975): cannot locate symbol "_ZN7android6Camera17setPreviewDisplayERKNS_2spINS_8ISurfaceEEE" referenced by "libnative_camera_r2.2.0.so"... W/System.err(16441): java.lang.reflect.InvocationTargetException W/System.err(16441):    at java.lang.reflect.Method.invokeNative(Native Method) W/System.err(16441):    at java.lang.reflect.Method.invoke(Method.java:511) W/System.err(16441):    at org.qtproject.qt5.android.bindings.QtActivity.loadApplication(QtActivity.java:237) W/System.err(16441):    at org.qtproject.qt5.android.bindings.QtActivity.startApp(QtActivity.java:634) W/System.err(16441):    at org.qtproject.qt5.android.bindings.QtActivity.onCreate(QtActivity.java:863) W/System.err(16441):    at android.app.Activity.performCreate(Activity.java:5165) W/System.err(16441):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1103) W/System.err(16441):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2419) W/System.err(16441):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2520) W/System.err(16441):    at android.app.ActivityThread.access$600(ActivityThread.java:162) W/System.err(16441):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1366) W/System.err(16441):    at android.os.Handler.dispatchMessage(Handler.java:99) W/System.err(16441):    at android.os.Looper.loop(Looper.java:158) W/System.err(16441):    at android.app.ActivityThread.main(ActivityThread.java:5751) W/System.err(16441):    at java.lang.reflect.Method.invokeNative(Native Method) W/System.err(16441):    at java.lang.reflect.Method.invoke(Method.java:511) W/System.err(16441):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1083) W/System.err(16441):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:850) W/System.err(16441):    at dalvik.system.NativeStart.main(Native Method) W/System.err(16441): Caused by: java.lang.UnsatisfiedLinkError: Cannot load library: soinfo_relocate(linker.cpp:975): cannot locate symbol "_ZN7android6Camera17setPreviewDisplayERKNS_2spINS_8ISurfaceEEE" referenced by "libnative_camera_r2.2.0.so"... W/System.err(16441):    at java.lang.Runtime.load(Runtime.java:340) W/System.err(16441):    at java.lang.System.load(System.java:521) W/System.err(16441):    at org.qtproject.qt5.android.QtNative.loadBundledLibraries(QtNative.java:150) W/System.err(16441):    at org.qtproject.qt5.android.QtActivityDelegate.loadApplication(QtActivityDelegate.java:410) W/System.err(16441):    ... 19 more My .pro file looks like the following: # Add more folders to ship with the application, here folder_01.source = qml/app folder_01.target = qml DEPLOYMENTFOLDERS = folder_01   # Additional import path used to resolve QML modules in Creator's code model QML_IMPORT_PATH =   # The .cpp file which was generated for your project. Feel free to hack it. SOURCES += main.cpp   # OpenCv Configuration #INCLUDEPATH += /usr/include/opencv #INCLUDEPATH += /usr/include/opencv2 #INCLUDEPATH += /usr/include #INCLUDEPATH += /usr/include/opencv2/core   ANDROID_OPENCV = /home/valorcurse/Qt/android/opencv   LIBS += \ $$ANDROID_OPENCV/libs/armeabi-v7a/libopencv_calib3d.a \ $$ANDROID_OPENCV/libs/armeabi-v7a/libopencv_flann.a \ $$ANDROID_OPENCV/libs/armeabi-v7a/libopencv_objdetect.a \ $$ANDROID_OPENCV/libs/armeabi-v7a/libopencv_contrib.a \ $$ANDROID_OPENCV/libs/armeabi-v7a/libopencv_video.a \ $$ANDROID_OPENCV/libs/armeabi-v7a/libopencv_ml.a \ $$ANDROID_OPENCV/libs/armeabi-v7a/libopencv_legacy.a \ $$ANDROID_OPENCV/libs/armeabi-v7a/libopencv_highgui.a \ $$ANDROID_OPENCV/3rdparty/libs/armeabi-v7a/liblibjpeg.a \ $$ANDROID_OPENCV/3rdparty/libs/armeabi-v7a/liblibpng.a \ $$ANDROID_OPENCV/3rdparty/libs/armeabi-v7a/liblibtiff.a \ $$ANDROID_OPENCV/3rdparty/libs/armeabi-v7a/liblibjasper.a \ $$ANDROID_OPENCV/3rdparty/libs/armeabi-v7a/libzlib.a \ $$ANDROID_OPENCV/libs/armeabi-v7a/libopencv_ts.a \ $$ANDROID_OPENCV/libs/armeabi-v7a/libopencv_imgproc.a \ $$ANDROID_OPENCV/libs/armeabi-v7a/libopencv_core.a \ $$ANDROID_OPENCV/libs/armeabi-v7a/libopencv_androidcamera.a \ $$ANDROID_OPENCV/libs/armeabi-v7a/libopencv_features2d.a   INCLUDEPATH += $$ANDROID_OPENCV/jni/include/opencv INCLUDEPATH += $$ANDROID_OPENCV/jni/include/opencv2 INCLUDEPATH += $$ANDROID_OPENCV/jni/include/   ANDROID_EXTRA_LIBS += $$files($$ANDROID_OPENCV/libs/armeabi-v7a/*.so) # Tried including all libs with the app   # Installation path # target.path =   # Please do not modify the following two lines. Required for deployment. include(qtquick2applicationviewer/qtquick2applicationviewer.pri) qtcAddDeployment()   INCLUDEPATH += $$PWD/../build-app-Android_for_armeabi_v7a_GCC_4_8_Qt_5_2_1-Debug DEPENDPATH += $$PWD/../build-app-Android_for_armeabi_v7a_GCC_4_8_Qt_5_2_1-Debug   ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android   OTHER_FILES += \     android/AndroidManifest.xml Any idea what I might be doing wrong?

QMultiHashIterator remove entry if QPointer.isNull()

$
0
0
I’ve got a QMultiHash which has got a QPointer as it’s value. QMultiHash<QString, QPointer<QObject> > objectList; What i want to do is iterate trough each entry in this MultiHash, i’ve done it with QMultiHash::iterator. QMultiHash<QString, QPointer<QObject> >::iterator i = objectList.find("someKey"); while(i != objectList.end() && i.key() == "someKey"){     // Code } Is it possible to check for i.key().isNull() and remove only this entry from the QMultiHash objectList if it is null? It should be possible to search for this value in objectList by using it’s uniqueKey, but it looks like i can’t access the QPointer function .isNull().

Custom class objects in a tree

$
0
0
Hi, Im very new to Qt and having trouble getting my head around some of the concepts. What I have is an abstract class (Foo) that I would like to keep in a tree structure, much like the Object tree in Designer. I would like the tree view to display two properties of Foo, the Name and Type. I would like this to work with internal drag and drop. I see two approaches: 1. I add a parent and children pointers to my Foo class and use that to populate a QTreeWidget 2. I make use of the QTreeView and implement QAbstractItemModel. Option 1 feels comfortable but wasteful, so I started on option 2. Using the Editable Tree Model Example I quickly ran into problems. Firstly I have two columns that I want to see in the tree, Name and Type, but these values are driven from Foo. So I wanted each TreeItem to hold an instance of Foo that it would query for the Name and Type columns. I did this by adding a third column to hold a pointer to a Foo instance (also added Q_DECLARE_METATYPE to Foo so QVariant would work). Then I changed the data method in TreeModel to switch on the index.column and query the TreeItem via a getter i.e. getName and removed the data method in TreeItem and added the getters for name and type. At this point it seemed to work but as soon as I tried to implement internal drag and drop I realised that this isn’t going to ‘just work’. The instance of Foo inside the TreeItem is lost during the insert/remove row dance. Am I going about this the right way? Is adding a third column the only way to add an arbitrary class object to my tree nodes? Should I merge the concept of TreeItem and Foo? How would I do that when Foo is abstract? Any help being pointed in the right direction to solve this (especially the Qt way) would be appreciated. Thanks, Mike

Problem with QPixmap

$
0
0
Hello everyone, my name is Nanouk and I am trying to developp a game for the lobby of the game I need to make a mask in a specific color on an image, I tried everything possible and came out with this : QPixmap pix(“images/radioButtonEmpty.png”); pix.createMaskFromColor(QColor(50,200,50),Qt::MaskInColor); ui->label->setPixmap(pix); but the specific color isn’t transparent at all. Also I have a problem with my pixmaps, the ones I define with the UI Form only show when I compile and execute in QT Creator and the ones I define as Code doesn’t show. But when I go in the file and launch the .exe , it’s the EXACT opposite, labels of the ui don’t show and the ones define by code are displayed. I would really like you guys to help me, since im new to this forum.

Alpha channel other than "0xFF" in LinuxFB QPA platform

$
0
0
I’m using Qt5.1.1 with LinuxFB QPA platform (I’m bound to LinuxFB platform, and can’t use another). I would like to have Qt write to LinuxFB custom alpha values alongside values of other color components. For example, if I set following style-sheet for QMainWindow “background-color: rgba(20, 20, 20, 0);” – I get following hex value of ARGB in frame-buffer 0xFF141414. Can someone instruct me what code should I change to accomplish this. I’ve tried to add some log-trace statements and I made some progress in isolating where the problem lies, but Qt is overwhelming and I would really appreciate any tip on this matter.

Parse QML to QVariant?

$
0
0
Hi all, I have a number of quite complicated QVariant structures. Like this: QVariantMap booster1; booster1[“power”] = 10; booster1[“dir”] = 45; QVariantMap booster2; booster2[“power”] = 10; booster2[“dir”] = -45; QVariantList boosters; boosters.push_back(booster1); boosters.push_back(booster2); QVariantMap spaceship; spaceship[“boosters”] = boosters; (This is just an example). I am getting really confused because I have to define everything backwards. Instead I would like to write it in QML syntax: spaceship : { boosters : [ { power : 10, dir : 45 }, { power : 10, dir : -45 } ] } Is there a parser or something that takes QML as input and returns me a QVariant? Any tips on writing one? I think this is a quite useful feature

Using QHostInfo to get host name from an IP

$
0
0
Hi all! I am trying to get the host name from a IP inside my LAN using QHostInfo. This is my code: bool rede::verificaIP(QString ip) {     info.setAddresses();     QHostInfo info = QHostInfo::fromName(ip);       qDebug() << "IP:" << info.hostName() << info.addresses();       return false; } The ip parameter is 192.168.1.91 But the result is: IP: “192.168.1.91” (QHostAddress(“192.168.1.91”) ) The function does not returns the host name Can anyone help me? Thanks a lot.

Mac deployment (clang) : @BUNDLEIDENTIFIER@ in Info.plist replaced with com.yourcompany

$
0
0
Hi, I am developing on MacOSX 10.8 with Clang x86 64bit, with Qt 5.2.1 (and 5.2.0 before that). Here is my problem : in my .app, in Info.plist, the key CFBundleIdentifier equals com.yourcompany.MyApp. It is a problem because I want to deploy my application, and I want to replace com.yourcompany by my own value. I have looked for a solution, and I found that normally, this value is set by setting QMAKE_TARGET_BUNDLE_PREFIX in the .pro (https://bugreports.qt-project.org/browse/QTBUG-19006). Unfortunately, after looking into Qt’s code, I realized that this solution was only available when compiling with pbuilder : when using Clang, “@BUNDLEIDENTIFIER@” is replaced automatically with com.yourcompany, and the value of QMAKE_TARGET_BUNDLE_PREFIX is not read. Qt/5.2.1/Src/qtbase/qmake/generators/mac/pbuilder_pbx.cpp : QString bundlePrefix = project->first("QMAKE_TARGET_BUNDLE_PREFIX").toQString(); if (bundlePrefix.isEmpty())     bundlePrefix = "com.yourcompany"; plist_in_text = plist_in_text.replace("@BUNDLEIDENTIFIER@", bundlePrefix + "." + QLatin1String("${PRODUCT_NAME:rfc1034identifier}")); Qt/5.2.1/Src/qtbase/qmake/generators/unix/unixmake2.cpp : QString bundleIdentifier = "com.yourcompany." + var("QMAKE_BUNDLE"); if (bundleIdentifier.endsWith(".app"))     bundleIdentifier.chop(4); t << "@$(DEL_FILE) " << info_plist_out << "\n\t"   << "@sed "; foreach (const ProString &arg, commonSedArgs)     t << arg; t << "-e \"s,@ICON@," << icon.section(Option::dir_sep, -1) << ",g\" "   << "-e \"s,@BUNDLEIDENTIFIER@," << bundleIdentifier << ",g\" " For now, the only solutions I found are : 1. make my own Info.plist, but it would be complicated if it is just to change one key… 2. replace manually the default value. That is the solution that I chose, because I use a bash script to deploy my application by creating a .pkg file. This way, I just have to do : sed -i '' -e 's/com.yourcompany/com.MyCompany/g' MyApp.app/Contents/Info.plist I could keep going like this, but I came on this forum because I think that it deserved to be mentioned somewhere, and in case someone has a better solution. I didn’t report a bug, because I am not sure that it is one : it has already been reported but only fixed for the pbuilder compilation, so maybe there is a reason why it is not done for Clang. I hope this will be useful for other people who might have the same problem. If you know a better solution, please tell me ! Thanks ! :) Kniebou

Just unminimized window not receiving mouseMoveEvent on OSX, unlike Linux?

$
0
0
My app calls self.setMouseTracking(True) on a QGraphicsView (which is in a QMainWindow, and which has a QGraphicsScene.) On OSX, after a user unminimizes the window, no mouseMoveEvents are received (in the QGraphicsScene) until the user clicks the mouse in the window. This is unlike the behavior on Linux. I have read about the ‘focus follows mouse’ issue on OSX, which says that on OSX a window does not receive keyboard focus or get raised to the top just because a mouse moves across a visible portion of the window. But shouldn’t a window that has just been unminimized have keyboard focus and be on top (foreground?) and receive mouse move events (mouse focus?) on all platforms? (I am not using the hover capabilities of Qt, but implementing my own hover. I hope this is irrelevant.) I don’t understand and don’t know how to proceed, except to start hacking, such as calling setActiveWindow or call setMouseTracking on an exposeEvent or on the focusChanged signal, even though I don’t think it should be necessary?
Viewing all 18427 articles
Browse latest View live




Latest Images