Internal Error Invalid Timerid
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up pyqt model/view drag and drop:QAbstractItemModel::endMoveRows: Invalid index and QAbstractEventDispatcher: INTERNAL ERROR, timer ID 0 is too large up vote 2 down vote favorite I've got a pyqt implementation of QTableView and QAbstractItemModel. In QTableView I've implemented Drag-and-Drop to allow user to drag rows with mouse by clicking on a cell and dragging it. mousePressEvent, startDrag and dropEvent functions are relevant to this process: class View(QTableView): def __init__(self, parent=None): QTableView.__init__(self, parent=None) #self.setSelectionMode(self.ExtendedSelection) self.setSelectionMode(self.MultiSelection) self.setDragEnabled(True) self.acceptDrops() self.setDragDropMode(self.InternalMove) self.setDropIndicatorShown(True) self.verticalHeader().setVisible(False) self.horizontalHeader().setVisible(False) self.horizontalHeader().setStretchLastSection(True) def dragEnterEvent(self, event): event.accept() def dragMoveEvent(self, event): event.accept() def dropEvent(self, event): point = event.pos() index = self.indexAt(event.pos()) event.accept() if int(index.row()) != self.drag_row: try: self.model().moveRows(QModelIndex(), self.drag_row, self.drag_row, QModelIn except Exception as E: print E def mousePressEvent(self, event): print "mousePressEvent called" self.startDrag(event) super(View, self).mousePressEvent(event) def startDrag(self, event): index = self.indexAt(event.pos()) if not index.isVal
Info Download Help (Windows Only) int DiscardAsyncTimer (int timerID); Purpose This function discards the asynchronous timer with the specified timer ID. The function removes the timer from the list of existing timers and stops the timer events from occurring. The timer, thus, ceases to exist. If the ID is specified as –1, all timers are discarded. NoteA call to create http://stackoverflow.com/questions/23157765/pyqt-model-view-drag-and-dropqabstractitemmodelendmoverows-invalid-index-and or discard an asynchronous timer will not complete (will block) until all outstanding asynchronous callbacks return. Parameters Input Name Type Description timerID int Specifies the timer ID of the timer to be discarded. If specified as –1, all timers are discarded. Return Value Name Type Description http://zone.ni.com/reference/en-XX/help/370051V-01/toolslib/functionreference/cvidiscardasynctimer/ status int Return value indicating whether the function was successful. A negative number indicates that an error occurred. Return Values: 0Success. –1The system failed to allocate a timer. –2No more IDs are available to assign to a new timer. –3Not enough memory left for this operation. –4The timer with the given ID was not found. –5Initialization with a call to NewAsyncTimer was not done. –6An internal error occurred. –7The value of a parameter passed to this function was invalid. –8The functionality is only available on real-time operating systems. –9You cannot set this attribute. Additional Information Library: Asynchronous Timers Include file: toolbox\asynctmr.h LabWindows/CVI compatibility: LabWindows/CVI 5.0 and later YourFeedback! Poor|Excellent Yes No Document Quality? Answered Your Question? Add Comments 1 2 3 4 5 My Profile|Privacy|Legal|Contact NI© National Instruments Corporation. All rights reserved.|
Sign in Pricing Blog Support Search GitHub This repository Watch 37 Star 49 Fork 87 openwebos/qt Code Pull requests 0 Projects 0 Pulse Graphs Permalink Branch: master Switch branches/tags Branches Tags TouchpadGFXFixes master nyx Nothing to show versions/4.8.3 submissions/4 submissions/3 submissions/2 submissions/1.04 submissions/1.03 submissions/1.02 submissions/1.01 submissions/1.00 0.35 0.34 0.33 0.32 0.31 0.22 0.21 0.3 0.2 0.1 Nothing to show Find file Copy path qt/src/corelib/kernel/qabstracteventdispatcher.cpp Fetching contributors… Cannot retrieve contributors at this time Raw Blame History 561 lines (453 sloc) 17.5 KB /**************************************************************************** ** ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/ ** ** This file is part of the QtCore module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage ** This file may be used under the terms of the GNU Lesser General Public ** License version 2.1 as published by the Free Software Foundation and ** appearing in the file LICENSE.LGPL included in the packaging of this ** file. Please review the following information to ensure the GNU Lesser ** General Public License version 2.1 requirements will be met: ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Nokia gives you certain additional ** rights. These rights are described in the Nokia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU General ** Public License version 3.0 as published by the Free Software Foundation ** and appearing in the file LICENSE.GPL included in the packaging of this ** file. Please review the following information to ensure the GNU General ** Public License version 3.0 requirements will be met: ** http://www.gnu.org/copyleft/gpl.html. ** ** Other Usage ** Alternatively, this file may be used in accordance with the terms and ** conditions contained in a signed written agreement between you and Nokia. ** ** ** ** ** ** ** $QT_END_LICENSE$ ** ****************************************************************************/ #include "qabstracteventdispatcher.h" #include "qabstracteventdispatcher_p.h" #include "qthread.h" #include