Results 1 to 1 of 1

Thread: Mouse events or position issues with Qt 5.6

  1. #1
    Join Date
    Apr 2013
    Posts
    14
    Thanks
    3
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Mouse events or position issues with Qt 5.6

    Hi,

    I have had a very weird UI issue on our Qt application for Windows. Ever since upgrading from Qt 5.3.1 to 5.6.0, some widgets have become unclickable until I resize their parent (QDialog, QWizard or simply QSplitter). This includes QPushButtons, QRadioButtons, QCheckBoxes, etc. What's weird is that this only happens on mine and one other developer's machines - all other developers do not get this problem. I was thinking that it may have something to do with having more than one version of Qt installed (I have 4.8., 5.3.1 and 5.6.0) - but that seems unlikely (plus all other developers have multiple versions as well). We use VisualStudio 2015 on Windows 7.

    I've attached some small code that reproduces the problem for me 100% but may or may not on other machines. What happens for me, is when I click the "click" button and the QWizard pops up, I cannot click the "Cancel" button (nor the "Finish" button once it gets enabled) - the mouse event does not seem to register at all. I can click the X on the top-right, though. If I resize the QWizard in any direction, then I can click the "Cancel" button.

    A possible clue is that on QDialogs that have this problem, QComboBoxes behave weirdly as well - the popup view is displayed in a weird positon (screenshot below). Again, if I resize the parent, the popup view shows in the expected location. This may indicate some problem with either positions or parent objects not being set correctly somewhere (relative positions) but I'm not sure where to start.

    Capture.jpg

    Any help is appreciated.


    EDIT:
    It does seem to be related to setting the parent somehow, because using the attached example, if I add the wizard page with either:
    Qt Code:
    1. wizard->addPage(new GeneralPropertiesPage(QSet<QString>() << "test", this));
    To copy to clipboard, switch view to plain text mode 
    or:
    Qt Code:
    1. wizard->addPage(new GeneralPropertiesPage(QSet<QString>() << "test", NULL));
    To copy to clipboard, switch view to plain text mode 
    makes the popup view of the combobox look like this:
    Capture2.jpg
    While using:
    Qt Code:
    1. wizard->addPage(new GeneralPropertiesPage(QSet<QString>() << "test", wizard));
    To copy to clipboard, switch view to plain text mode 
    makes it look like this:
    Capture3.jpg
    Still not sure what the root cause is, though.
    Attached Files Attached Files
    Last edited by regular; 15th June 2016 at 16:57.

Similar Threads

  1. Replies: 6
    Last Post: 30th December 2015, 12:36
  2. Mouse position
    By nomad.007 in forum Newbie
    Replies: 2
    Last Post: 8th September 2015, 17:11
  3. view position of mouse position in GraphicsScene
    By Raghaw in forum Qt Programming
    Replies: 2
    Last Post: 23rd August 2012, 05:46
  4. Replies: 3
    Last Post: 8th October 2011, 10:46
  5. mouse moving don't produce mouse events
    By coralbird in forum Qt Programming
    Replies: 1
    Last Post: 13th September 2006, 07:13

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.