qt

Pyqt get pixel position and value when mouse click on the image

Hello, Overwriting mouse event on pixMapItem didn't work for me ; the mouse click event is not detected by the pixMapItem. Here is my code : import sys from PyQt4.QtCore import * from PyQt4.QtGui import * class DrawImage( QMainWindow ): def init(self, path): QMainWindow.__init__(self) self.setWindowTitle('Select Window') ...

Qt: Qt classes vs. standard C++

A large amount of functionality is duplicated between standard c++ and Qt. At some point it seems logical but many times it looks foolish. Like I feel like doing a new programming language, learning things which I already know. e.g. using QFile. Also if I do it all Qt way and suppose now I want to move out of Qt framework it will be too...

Qt thick database client architecture

My goal is to create a thick client to the database. Basically it is all about managing three lists of data. I would like to slice my application into decoupled layers so using Qt's Model/View framework seems natural to me. When should I create QSql*Model instances? I need to be able to connect/disconnect to/from the database severa...

QtWebkit: console application

I am new to Qt. I am building a console application and I need to process lot of real world html pages. QtWebkit comes as an easy choice because of clearly cut APIs and easy availability. I checked out the docs and they say that I can load pages by using QWebView::load(). But I am building a console application and I cannot use a widge...

Problem Deploying QT Jambi with web start on Mac OS X

I have a Java application, built with eclipse, that uses QTJambi. Running the application from the command line works perfectly. java -d32 -XstartOnFirstThread -jar MyApplication.jar someArg However, trying to deploy the application with WebStart is proving difficult. I've done a whole lot of reading and it seems many people have issu...

Disable qt creator auto build when debug

How to disable qt creator from auto building when trying to debug? Currently when debug button is clicked, it automatically starts build. I want to disable this and just proceed to debug. ...

Qt Signals and Slot connected twice... what happens?

Hi, What happens if the same signal and slot is connected twice? And how is the mechanism handled? Regards, ...

Unit Testing in Qt with Highly Dependent Functions

I'm new to unit testing. I want to code unit tests in Qt, but my functions(login, request etc...) heavily depend on other resources such as a server. How can I supply a block box in this situation? Do you know any open source project which I can examine unit test classes for similar situations? ...

QT Embedded: How to generate an event to ESC (Escape), F1 and such keys.

Hello, I'm working on an embedded software in QT that uses LIRC to handle RC (Remote Control) key presses. I managed to map all the RC keys so directFB is getting keypresses like these: 00000000000011b7 00 MENU 00000000000011a7 00 EXIT 0000000000001193 00 RED I've created a QT class that uses sockets to grab LIRC keys and generate K...

QT / CE on Windows CE 6.0, app won't run

I'm a .NET CF developer trying to move to QT/CE. I'm trying to port one of my app written in .NET CF to QT/CE targeted run on Windows Embedded CE 6.0 GPS made by China. I don't have access to original SDK (china manufacturers don't provide them) so, as QT mailing lists suggested, I used Windows CE 5.0 Standard SDK as my option. Here is m...

Elegant non-const reference to a QVariantMap node?

Basically I need to generate a nested QVariantMap. (Think JSON): { "foo" : 1, "bar" : { "node" : 0 } } I do this in Qt this way: QVariantMap r, r_bar; r["foo"] = QVariant(1); r_bar["node"] = QVariant(0); r["bar"] = r_bar; Which is very inconvenient for large nested structures. Is there an elegant way of doing this, such as this (...

Qt on OS X building a 10.5 compatible application on 10.6

I'm running Mac OS X 10.6 on my development machine and am building a QT application that I would like to work on 10.5 (and 10.4) as well as 10.6. My application has both a library component and a gui component, each as their own QT project with dependencies. I have followed the instructions of the QT deployment guide. In both .pro file...

Nokia Qt SDK and Qt Mobility API

It looks like Nokia Qt SDK does not provide QtMultimediaKit with the package which is a part of Qt Mobility API 1.0.2. e.g. I cannot use QMediaPlayer to play *.mp4 file (Simbiot^3) QMediaPlayer *player = new QMediaPlayer; playlist = new QMediaPlaylist(player); playlist->append(QUrl("http://example.com/myfile1.mp4")); playlist->se...

chart library for QT

Hello, Is there any opensource or free chart library for Qt ? I mean XY charts (not bar charts or sth like that) ? thanks for help ...

How to display icon in QMessageBox?

I have an about box that I'm trying to display an icon inside. Here is my code: QMessageBox about_box(this); about_box.setText("..."); about_box.setIconPixmap(QPixmap("qrc:/images/logo.png")); about_box.setParent(this); about_box.exec(); Here is my resource file: <RCC> <qresource prefix="/images"> <file>logo.png</file>...

how do you create standalone(just one exe) application with qt?

how do you create standalone(just one exe) application with qt? ...

Qt: Accessing cells in a QTableView

I have a QTableView which is pulling a list of locations and latitude/longitude coordinates from an SQLite database. I want to extract the latitude and longitude from the row that the user has selected in the table, and am using the following code, but it looks fairly convoluted. Maybe I'm just not understanding how to fully utilize Qt's...

Why don't QLocalSocket/Server connections work when one process was invoked by an NSIS installer?

I have an NSIS installer that installs my Qt application. At the end of the install process, the installer gives the user the option to launch the application immediately. My application uses QLocalSocket/QLocalServer to talk to other local instances of the application. (They talk to each other basically just to ensure that there's only...

Undefined reference to fp_init() Using fprint in QT

I am trying to use the libfprint in my QT application #include <QtGui/QApplication> #include "mainwindow.h" #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <libfprint/fprint.h> int main(int argc, char *argv[]) { int r = 1; struct fp_dscv_dev *ddev; struct fp_dscv_dev **discovered_devs; str...

Why does the main window in QT disappear?

Create a simple Qt4 Gui Application, surround the window construction and show commands in an if statement and run the application. When I do this the window flashes for a microsecond and then disappears ... Why? I'm running Qt Creator 1.2.1, Based on Qt 4.5.2(32 bit), on Windows 7 Pro. #include <QtGui/QApplication> #include "mainwind...