Grab mouse movement
I am writing a little utill for me on ruby using qt. How to access global mouse movement and keyboard input events? ...
I am writing a little utill for me on ruby using qt. How to access global mouse movement and keyboard input events? ...
I have a QTransform object and would like to know the angle in degrees that the object is rotated by, however there is no clear example of how to do this: http://doc.trolltech.com/4.4/qtransform.html#basic-matrix-operations Setting it is easy, getting it back out again is hard. ...
I'm migrating an application to Qt from MFC. The MFC app would use GDI calls to construct the window (a graph plot, basically). It would draw to a memory bitmap back buffer, and then BitBlt that to the screen. Qt, however, already does double buffering. When the user clicks and drags in the graph, I'd like that section of the window ...
Hi! I'm learning to develop apps using Qt Creator. I have built a simple app under Windows, depends on uses mingwm10.dll, QtCore4.dll, QtGui4.dll, QtNetwork4.dll. Out of QtQui4.dll I use only a a couple of widgets, and don't need all of the rest... Is it possible to either shrink the size of QtGui4.dll or do something else to decrease de...
Hey! I try to do the following QList<QButtonGroup*> groups; for (int i=0; i<nGroup; i++) { QButtonGroup *objects = new QButtonGroup(this); objects->setExclusive(false); for (int j=0; j<nObject; j++) { Led *tempLed = new Led(); tempLed->setAutoExclusive(false); ...
My application is using Qt. I have a class which is inheriting QGraphicsPixmapItem. When applying transformations on these items (for instance, rotations), the origin of the item (or the pivot point) is always the top left corner. I'd like to change this origin, so that, for instance, when setting the position of the item, this would ...
Hi! I use QGraphicsView to create a sort of circut editor, which has elements in it, which have connectors. It should be possible to connect those connectors with wires. However I have a problem, while I drag from one connector to another, Qt grabs mouse, and other connectors stop receiving hoverEnterEvent. Btw, on hover connectors resiz...
Maybe its a very dumb question but I hope you can give me some answers. I have a commercial application which uses Qt3 for its GUI and an embedded Python interpreter (command line) for scripting. I want to write a custom plugin for this application which uses Qt4. The plugin is mainly a subclassed QMainWindow-class that is linked into a...
I wrote a very simple Qt program here: int main(int argc, char* argv[]) { QApplication app(argc, argv); QTableView table(&frame); table.resize(100, 100); table.show(); return app.exec(); } And when I try to set a breakpoint where the table gets clicked, I get this error from gdb: (gdb) symbol-file /usr/lib/libQt...
I am new to qmake and I am trying to build an existing application. Qt was originally installed in /usr/local/lib/Qt-4.3.5 and 'qmake -query QT_INSTALL_PREFIX' returns that path. I have moved the Qt library to another location and the generated Makefiles are peppered with the /usr/local original path. How can I force qmake to use the n...
I've been reading a lot about Unit tests and Test Driven developemnt. Recently, I also read java unit test code. I however, prefer to develop in Qt. So I googled up "unit testing in c++" and found a host of information about various unit testing frameworks available for C++. However, I could not find a reliable comparison of the the v...
My code looks somehow like the following: table = QTableWidget() table.horizontalHeader().restoreState(settings.value("savedState")) table.setColumnCount(3) settings.setValue("savedState", table.horizontalHeader().saveState()) If I run it the first time it there are only 3 column headers. The second time there are 6 and the third 9.....
I am trying to develop a plasmoid in python. I got some good tutorials here (techbase.kde.org/Development/Tutorials/Plasma) and they are really helpful, but they don't have documentation or examples about QT layouts and their usage. I haven't programmed with QT, but I know C++ well. So, the resources shouldn't be necessarily python api...
I have following printing code: void Print(QPrinter *printer) { QPainter q(printer); q.setRenderHint(QPainter::HighQualityAntialiasing, true); q.setPen(QPen(QColor("red"))); q.drawRect(printer->pageRect()); q.drawLine(printer->pageRect().topRight(), printer->pageRect().bottomLeft()); q.setPen(QPen(QColor("blue"...
I currently use QtScript for scripting functionality in my C++ application, but it's rather "heavy" on the cpu. When a thread evaluates all the scripts in a loop the cpu usage increases to 90%-100%. Even when i put it to sleep for 1 msec every 5 scripts it stays above 75% cpu usage. Are there any other, easy to implement, scripting fram...
My application needs to play sound files. The only cross-platform file format I can use is WAVE (I'm using QSound of the Qt framework). The file sizes of these sounds are quite large and I'd like to know if there is a way to reduce it, without losing (too much) quality. I need the file to be stereo. ...
I have a custom Qt widget which I used to display disassembly and I am looking to add syntax coloring to it. Currently, I simply set the QPen to a solid color, construct the text I want to display, and render it to the QPainter at the appropriate coordinates. The question is, what is the best approach to adding syntax coloring? I've th...
I'm trying to compile Qt 4.5.1 on Windows XP targeting wince50. I have the prerequisites installed (VS2008, WinCE50SDK, ActivePerl 5.10) and have downloaded the qt-embedded-wince-opensource-src-4.5.1.zip which has been installed in c:\Qt\4.5.1 and c:\Qt\4.5.1\bin has been added to the path. From a VS command prompt, I navigate to c:\Qt...
When exposing some code to D-Bus using Qt D-Bus bindings, when should one use a Qt Adaptor over a Qt Interface? I'm having a difficult time understanding how exactly they differ since it seems like they provide the same functionality. ...
I am attempting to re-implement the Copy behavior for a QTextEdit object. The custom context menu I create works as expected when the 'Copy' button is clicked, but Ctrl+C isn't being handled correctly. Since the context menu doesn't have any issues, I'll omit that portion of the code. // Create a text edit box for text editing QTextEdit...