Navigation

    Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    1. Home
    2. Tags
    3. event
    Log in to post

    • SOLVED exec of dialog not return in multithreading environment
      General and Desktop • event multi-thread deadlock • • tmp15711  

      27
      0
      Votes
      27
      Posts
      5667
      Views

      @kshegunov Thanks. I can reproduce the same behavior with a single thread. #include <QtCore> struct Object: QObject{ Q_OBJECT public slots: void foo(){ qDebug() << __LINE__; while(entered) qApp->processEvents(); qDebug() << __LINE__; QEventLoop loop; QTimer::singleShot(1000, &loop, SLOT(quit())); entered = true; loop.exec(); entered = false; qDebug() << __LINE__; } private: bool entered = false; }; int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); Object w; QTimer::singleShot(0, &w, SLOT(foo())); QTimer::singleShot(0, &w, SLOT(foo())); QTimer::singleShot(3000, &a, SLOT(quit())); a.exec(); qDebug() << __LINE__; } #include "main.moc" In fact, it has nothing to do with multi-threads. I have never studied Qt source code. It seems exec will not return before all slots finish. So, the code actually creates a dead lock.
    • My Qt World Summit 2017 in pictures
      The Lounge • event gallery photos qtws17 qtws2017 • • vivaladav  

      1
      5
      Votes
      1
      Posts
      401
      Views

      No one has replied

    • UNSOLVED Can I be notified when a Item has finished repainting?
      QML and Qt Quick • event repaint • • Stefan Monov76  

      1
      0
      Votes
      1
      Posts
      280
      Views

      No one has replied

    • UNSOLVED TabletMove Event not notified
      General and Desktop • qt5 event event handling tablet stylus • • Deif Lou  

      1
      0
      Votes
      1
      Posts
      413
      Views

      No one has replied

    • UNSOLVED Sending key shortcuts to active window
      General and Desktop • event shortcut • • Peppy  

      5
      0
      Votes
      5
      Posts
      1537
      Views

      Well, I have a custom shortcut shC applied to Action/Menu which is global (in every window), but I can not register that into window A, or window B. I mean, I am on OS X, where there is only one menubar that is shared across the multiple windows, so I have to dispatch them, right? I mean, for example, Qt Creator has a shortcut "Run" which is invokable from many windows. But I can not make two menubars and/or having two actions, right?
    • UNSOLVED Problem with QKeyEvent isAutoRepeat function?
      General and Desktop • c++ event qkeyevent qkeypressevent • • faisal.tum  

      6
      0
      Votes
      6
      Posts
      2698
      Views

      Anyway solved it. I needed to call grabKeyboard function from the MainWindow class, so this->grabKeyboard() is the line I needed to add when key_0 button is pressed so that MainWindow doesn't lose the keyboard focus, and then when released I needed to add the line this->releaseKeyboard() to resume normal behaviour, that is, other widgets can have the keyboard focus.
    • SOLVED Disabling Wheel Event in a QGraphicsView ?
      General and Desktop • qgraphicsview event wheel • • Walux  

      4
      0
      Votes
      4
      Posts
      1825
      Views

      @Walux said: Probably not as good , so i'll use yours . just for clarification: Actually this is exactly the same approach, just a step later. (After the graphics view translated and forwarded it's received events to it's scene).
    • SOLVED KeyPressEvent singleTime ?
      General and Desktop • event keypressevent • • Walux  

      5
      0
      Votes
      5
      Posts
      989
      Views

      @mrjj It's alright , i figured it out ;) Huge thanks for your help :) Topic->setAsClosed(true);
    • UNSOLVED Propagate TAB key from delegate to custom editor
      General and Desktop • delegate event • • CarloEste  

      3
      0
      Votes
      3
      Posts
      975
      Views

      I tried, but it doesn't work.
    • UNSOLVED Catching Qt X11 3dMouse events in child thread
      General and Desktop • event threading x11 3dmouse • • MichalFasanek  

      2
      0
      Votes
      2
      Posts
      838
      Views

      Hi and welcome to devnet, What backtrace do you get from the crash ?
    • UNSOLVED Handling QInputMethodEvent
      General and Desktop • qt5.4 event line edit inputmethod japanese • • DivyPrakash  

      1
      0
      Votes
      1
      Posts
      582
      Views

      No one has replied

    • UNSOLVED How do I connect to an event of line edit completion/exit and catch it in a QTreeView?
      General and Desktop • qtreeview tableview event line edit qlinedit • • lancelotrose  

      6
      0
      Votes
      6
      Posts
      1884
      Views

      Sounds pretty crazy...
    • SOLVED Registering custom event types
      General and Desktop • event event loop • • kshegunov  

      5
      0
      Votes
      5
      Posts
      1323
      Views

      @SGaist When I finish up my code the obvious run and if it crashes test will tell for sure. Unfortunately, the documentation is very cryptic of such issues ... :)
    • UNSOLVED QML Calendar and update calendar view when adding new event
      QML and Qt Quick • qml event update calendar • • Lisbetti  

      1
      0
      Votes
      1
      Posts
      506
      Views

      No one has replied

    • UNSOLVED QML object that will receive (multi-)touch but also let it through like MouseArea {propagateComposedEvents: true}
      QML and Qt Quick • event touch multipointtouch • • Mertanian  

      1
      1
      Votes
      1
      Posts
      387
      Views

      No one has replied

    • UNSOLVED Arrows keys don’t catch in keyPressEvent()
      General and Desktop • event keys keypressevent • • IL  

      6
      0
      Votes
      6
      Posts
      6057
      Views

      i guess this issue will be solved along with your other issue.
    • UNSOLVED .NET events from ActiveQt
      General and Desktop • signal & slot event activeqt activex net • • Lucape  

      1
      0
      Votes
      1
      Posts
      531
      Views

      No one has replied

    • SOLVED QWebView Disable Backspace Key (But Not on HTML Fields)
      General and Desktop • qwebview event key disable backspace • • maximo  

      2
      0
      Votes
      2
      Posts
      1190
      Views

      Here's the solution. You have to do it in Javascript. Ensure jQuery is loaded in your web pages (even the IFRAME/FRAME ones) and then apply this code: <script type="text/javascript"> $(document).ready(function(){ // Disable backspace key except in fields. $(document).keydown(function(e) { var elid = $(document.activeElement).is('INPUT, TEXTAREA') ; if (e.keyCode === 8 && !elid) { if(e.ctrlKey) { window.history.back(); } else { // disable backspace e.preventDefault(); return false; } } }); }); </script> SOURCE: http://stackoverflow.com/a/17278620/105539
    • UNSOLVED Событие клика на всех элементах
      Russian • signal & slot gui event • • STRATEG_lLTY  

      1
      0
      Votes
      1
      Posts
      831
      Views

      No one has replied

    • [partial solved] How emit SIGNAL
      General and Desktop • signal event yoctopuce • • Franckynos  

      7
      0
      Votes
      7
      Posts
      1672
      Views

      @jsulm I have declared a pointer to my class to have access at the instance and it works! I found this methode not really good with static member but for the moment I have juste this solution.
    • I want to send a LeftMousePress event on a widget
      General and Desktop • event mouse • • ForestPoem  

      2
      0
      Votes
      2
      Posts
      791
      Views

      Hi, QWidget::mousePressEvent is probably what you are looking for
    • QDoubleSpinBox + mousePressEvent
      General and Desktop • event clickevent • • Goffer  

      9
      0
      Votes
      9
      Posts
      2467
      Views

      @SGaist I have tried to add a focusOut event in my loop but it doesn't detect it ... if event.type() == event.FocusOut: print "Widget focusOut"
    • fluidlauncher example: event management for forked process
      Mobile and Embedded • qt5.5 event background i.mx6 fluidlauncher • • Gary Bisson  

      1
      0
      Votes
      1
      Posts
      512
      Views

      No one has replied

    • Confusing eventFilter behaviour
      General and Desktop • event eventfilter • • Jakob  

      2
      0
      Votes
      2
      Posts
      871
      Views

      Hi, What you do is to send your event to the event dispatcher for it to dispatch said event to the correct object but at the same time you're setting your filter between the dispatcher and the rest of your application. Thus you are seeing the "impossible" Hope it helps
    • How to identify child class when overriding childEvent?
      General and Desktop • qobject event child • • shavera  

      1
      0
      Votes
      1
      Posts
      694
      Views

      No one has replied

    • PyQT - event is blocked, when combobox is clicked
      General and Desktop • qcombobox event • • Schiho  

      2
      0
      Votes
      2
      Posts
      1786
      Views

      Hi, You are missing a return False in your filterEvent function see the C++ documentation for more details
    • Event processing and orders
      General and Desktop • event timer order queued • • qtacc32  

      2
      0
      Votes
      2
      Posts
      854
      Views

      Pushing again.
    • MouseMoveEvent when scrolling
      General and Desktop • event qt 5.4.2 scroll mousemove • • petoknm  

      1
      0
      Votes
      1
      Posts
      742
      Views

      No one has replied

    • Issues with wheelEvent under Linux
      General and Desktop • bug event mouse wheel • • PierreBdR  

      3
      0
      Votes
      3
      Posts
      995
      Views

      I had an old mouse that gave irratic scroll wheel signals. It still worked but I did notice it jumpy when trying to scoll windows on occasion (all windows, not just Qt). I don't know what you are using but I would make sure the problem is not hardware.
    • [Solved] Send generated MouseEvents to Kernel event / DirectFB linux_input event
      Mobile and Embedded • event mouseevent directfb • • McLion  

      4
      0
      Votes
      4
      Posts
      1365
      Views

      @tomma Thanks a lot! That was great input. While reading about uinput the idea of writing to the event itself instead crossed me. I implemented a function that generates the various (basic) events of a touch screen and writing it directly to event0. It works perfect so far.
    • HoverMouseEvent - Increase Time User Has to Hover over before active
      General and Desktop • event hover • • oracle3001  

      4
      0
      Votes
      4
      Posts
      1391
      Views

      You could subclass QGraphicItems and implement the behavior only once there. Another thing to consider is using tooltip or asking the user to click on the QGraphicItem to trigger the pop-up instead of hovering. I haven't seem much software that open pop-up without the user asking for it, I would be annoyed by pop-up openning if it's not clear that my action opened it.
    • Qt and DirectFB - linux_input events handling
      Mobile and Embedded • event input directfb qt 4.6.3 dfb 1.4.3 • • McLion  

      13
      0
      Votes
      13
      Posts
      4883
      Views

      That doesn't really help. I know the difference between the 2 devices. The issue seems to be in the path and maybe the resulting timing Qt (QWS to be more precise) gets the XY position compared to the path over which it gets the click events. This seems not to travel the same way from DFB to QWS. Still have no solution for this.
    • [solved] ignore key press into editText?
      General and Desktop • event eventfilter qtexted • • Giorgi  

      2
      0
      Votes
      2
      Posts
      1953
      Views

      I found solution. i remplemented keyPressEvent from QTextEdit class void MyTextEdit::keyPressEvent(QKeyEvent *e) { if(e->key() == 16777220){ //enter clicked return; } return QTextEdit::keyPressEvent(e); }
    • [Solved again] Post a QGestureEvent to a QStateMachine
      General and Desktop • event state machine gestures statemachine postevent • • Malte J  

      8
      0
      Votes
      8
      Posts
      2084
      Views

      Yes that is correct. Every of the 8 custom gestures defines its own set of data in addition to the QGestureState, which is set by the according gesture recognizer. I now implemented an abstract superclass for all these gestures with a method getGestureData(). This method basically wraps all the data in a QMap<QString,QVariant> to make a general gesture treatment possible. The custom event GestureEvent now takes gesture type, the Qt::GestureState and the mentioned gesture data map. It was a little bit circumstantial, but now it works. Thanks again, Malte
    • Wiki Week
      Wiki Discussion • event cleanup wiki • • tekojo  

      31
      0
      Votes
      31
      Posts
      10856
      Views

      @Wieland ok, then I'll secretly add you to the admin list one day, when I forget that you didn't want to be there. Or tell me when you feel more at home, and I'll add rights :) The translations have been done at different times and might not have been updated when the original has been updated.
    • How to install multiple event filter on qApp??
      General and Desktop • event eventfilter installeventfil removeeventfilt • • Sidii  

      6
      0
      Votes
      6
      Posts
      2956
      Views

      @SGaist I got it. Thanks for the reply. Cheers