qt

Convert a QDateTime in UTC to local system time

I construct a QDateTime from a string like this: QDateTime date = QDateTime::fromString("2010-10-25T10:28:58.570Z", "yyyy-MM-ddTHH:mm:ss.zzzZ"); I know that date is in UTC because that is the way it's stored. But when I want to display this date to the user, it should be in the user's local time zone. date.toLocalTime() looks promisin...

QTableView is extremely slow (even for only 3000 rows)

Hi all, I have a table with 3000 rows and 8 columns. I use the QTableView. To insert items I do: QStandardItem* vSItem = new QStandardItem(); vSItem->setText("Blabla"); mModel->setItem(row, column, vSItem); where mModel is QStandardItemModel. Everything is fine if I have not to many rows, but when I am trying to visualize big data (...

Constructing QImage from unsigned char* data

I encountered a problem with passing Image object (captured with Point Grej FlyCapture2 SDK) to QImage object. I am getting a pointer associated with Image data by function: virtual unsigned char* FlyCapture2::GetData ( ) and then loading the data by: QImage::QImage ( uchar * data, int width, int height, int bytesPerLine, Format ...

Why is PyQt connect() syntax so verbose?

I'm just learning PyQt and looking at the Signals and Slots mechanism. I'm a bit baffled by the verbose syntax. Why do we have: self.connect(dial, SIGNAL("valueChanged(int)"), spinbox.setValue) I would much prefer to write the following: self.connect(dial.valueChanged, spinbox.setValue) Can anyone tell me why the connect() syntax n...

Qsettings - where is the location of the ini file?

hi, I'm using Qsettings to store some data as ini file in windows. I want to see the ini file - but I don't know what is the location of the ini file. this is my code: QSettings *set = new QSettings(QSettings::IniFormat, QSettings::UserScope, "bbb", "aaa"); set->setValue("size", size()); set->setValue("pos", pos...

Big QPixmaps crashes with OpenGL

Hello! I'm programming a QGraphicsView that has a lot of images. But when I display a JPEG with resolution 8528 x 1128 px (a panorama image), the QGraphicsPixmapItem does not render. It just displays a black square. Images of "normal" size renders good. I have not tried to find the "magick limit" for what sizes the problem occures on. ...

how to deploy qt based application with oracle plugin

i'm using the following article: http://doc.qt.nokia.com/4.6/deployment-windows.html#linking-the-application-to-qt-as-a-shared-library trying to build static build. when i try to load the command: configure -static -plugin-sql-oci i get the following error msg: WARNING: Qt does not support compiling the Oracle database driver w...

QTreeview mousePressEvent implementation prevents selection of items

Hello all I have class that inherited from Qtreeview and I implement simple ( empty ) mousePressEvent function But whenever I try to do this , the selection of the items in the Qtreeview are disabled , when I remove this function everything is working fine What im missing here ? Here Is the code: void MyTreeWidget::mousePressEvent(QM...

loading qm file

I'm trying to use translation files. I went through all the procedures: created ts file, translated it, but when I'm running the application again, it does not change. I worked on the nokia example, just like in the instructions. What could be my problem? int main(int argc, char *argv[]) { QApplication app(argc, argv); QTrans...

Qt Creator newbie questions

Hi, I am to Qt Creator. I have one of the latest versions. I have two really newby quesions. is there something like VS solution? In which you can add projects and set project dependencies and build order? if I have multiple open projects, how do I set one of them as "default", so that Ctrl+B builds specifically that project? ...

Is there something analogous to Qt::QueuedConnection in .NET?

In Qt, there is a nice idiom to have each object associated with a thread, so that all its event handlers will only run in that thread (unless called directly, of course). Is there anything even remotely like that in C#/.NET? If not, how would you start writing your own? Example: // threaded.h #include <QThread> #include <QDebug> #in...

Best way to develop cross platform mobile device app with QT?

We have a basic data entry app we want to develop using QT as the development platform. There appears to be Qt Mobility and QT Web Kit. The goal is to have the app run on as many mobile phone platforms as possible. What is the recommended approach? ...

Right Control for Showing Animation?

Hi., I need help on the selecting right control in the QT for animation. i need to show the animation in my QT application. The animation is in real time. i will get data from my hardware for every 5msec, every 100msec i need to update the animation. The animation nothing but drawing the line based on the my hardware input, and also...

how can i remove item from Qtreeview?

basically i want to remove item from Qtreeview on the dropEvent(QDropEvent *event) inherited in a qtreeview subclass. what is the best way to do this? ...

Is there a Qt widget to browse the hierarchy of widgets in an app (similar to Spy++)?

We've got an app with a complex hierarchy of widgets and I want to be able to browse this hierarchy, view and edit properties (such as size) in a similar manner to Spy++. It doesn't need to be running in an external app, if there is a widget that can display this information. So the question is, does such a mythical beast exist? ...

Does Qt platform for Linux support X5800?

4 months ago, after many installations of sdk, qt, libraries, mameo etc. I realized that Qt simulator for touch devices only supports windows. We linux users could only use button based old phone sim. I'm in the forum.nokia site searching for and improvement for 20 mins. Couldnt find any related information. ...

Qt QScriptEngine and default conversions from Qt Script to C++

I'm trying to convert a QVariantMap to Qt Script object. If I understood correctly it should go something like this: QScriptEngine* engine = new QScriptEngine(); QVariantMap* test = new QVariantMap(); test.insert("testkey", QString("testvalue")); QScriptValue testqs = engine->toScriptValue(test); QString value = testqs.property("testkey...

LSB link error possibly related to Qt

I am converting a large application to compile with lsbc++. I do not aim for full LSB compliance, I just want it to work with all but one of the LSB4.0 distributions (the remaining distribution is RHEL3 and lacks 100s of interfaces I use). The current situation is that I am missing one symbol in one library (of about 40 libraries/executa...

Cause QTextBrowser to NOT try to load external resources

We've implemented a subclass of QTextBrowser to act as a local cache. We've overriden loadResource to provide all the resources requested. This works well as long as the resource is properly formatted. However, if there is some problem with the resource then Qt will try to load the resource itself. We'd like to disable that functiona...

handle windows message in Qt

hi we can handle windows message in c# with override WndProc how we can do it in Qt ...