qt4

How to add Qjson lib to project ( MAC- Snow Leopard)

Hi, I am using mac (snow leopard) for developing apps(using Nokia QTSDK). I had installed the QJson lib in mac. But, I am struck-up with add that lib into my project. Please help me . How to add QJson lib to my project. Thanks in advance. ...

Parsing JSON using QJSON

Hi, My json output look like [{"id":2,"name":"AAA"},{"id":1,"name":"BBB"}]. I want to parse this using Qjson in mac. I am trying to parsing but I could not get any outputs . please help me. Thanks in advance. ...

How to reduce Qt's output size based on application usage

Hi all, I've recently been looking at Qt, and yes I should have started a long time ago... But the issue has come up that the prebuilt or self compiled .dlls, QtCore4.dll, QtGui4.dll, etc., are quite large. Since I must stay within the LGPL, is there a correct way to only link in what I need into the QtCore4.dll and QtGui4.dll files so...

QVarientMap _ Json Parsing in QT

I am using the following code for parsing. QJson::Parser parser; bool ok; QVariantMap result=parser.parse (cityReply->readAll(),&ok).toMap(); if (!ok) { qFatal("An error occurred during parsing"); exit (1); } foreach (QVariant city, result.toList()) { QVariantMap names = city.toMap(); qDebug() << "\t-" << names["name"]....

Problem with keyPressEvent on Nokia N97 Qt application

Hi Guys, I am stuck in the middle of this problem for a week or so now, I found a similar question posted on Qt for Symbian forum, but no body answered it. The problem is simply that when I run the application, well it is still not an application just a prototype :), either on the emulator or on a real device, and use the physical QWER...

QT mouse event handling problem

Greetings all, As seen in the picture I have an extended QWidget object (which draws the cell images and some countour data) inside a QScrollBar. User can zoom in/out the Image (QWidget size is changed according to the zoomed size of the QImage ) using mouse wheel. I process the events (mouseMoveEvent(),wheelEvent()..etc) by impleme...

Qt4. Why no sizePolicy virtual method in QLayoutItem?

I want to implement own QLayoutItem successor, but I can't provide QSizePolicy to layout, because no sizePolicy virtual method in QLayoutItem. I looked into Qt sources and found that QLayout takes sizePolicy directly from QWidget avoiding QWidgetItem. Why trolls have done so? And what I can do? ...

How to re-engineer an Ui-File from a given QWidget instance

Does anybody know if the Qt Toolkit provides a way to generate Ui Files from a given QWidget instance? Speaking in pseudo-code, I'm looking for something like this: //setup widget QWidget* pMyWidget=new QWidget(...); //fill widget with life pMyWidget->layout()->addWidget(new QLabel(...)); ... //finally write a Ui file: pMyWidget->expo...

screen orientation lock in qt

Hi! My question is about how to lock a screen orientation on WM using Qt? I know that I can use this code for Symbian: CAknAppUi* appUi = dynamic_cast<CAknAppUi*> (CEikonEnv::Static()->AppUi()); TRAPD(error, if (appUi) { // Lock application orientation into landscape appUi->SetOrientationL(CAknAppUi::EAppUiOrie...

Zooming in/out on a mouser point ?

Greetings all, As seen in the pictures. I have QWidget inside a QScrollArea. QWidget act as a render widget for cell image and some vector based contour data. User can performe zoom in/out and what simply happens is, it changes the QPainters scale and change the size of QWidget size accordinly. Now I want to perform the zooming i...

Qt interfaces or abstract classes and qobject_cast()

I have a fairly complex set of C++ classes that are re-written from Java. So each class has a single inherited class, and then it also implements one or more abstract classes (or interfaces). Is it possible to use qobject_cast() to convert from a class to one of the interfaces? If I derive all interfaces from QObject, I get an error due...

QtOpenGL and MacOS X -- Software rendering?

I'm developing a cross-platform application and am not very familiar with the Mac platform. I use Qt for the GUI. I use a QGLWidget to make sure the drawing (with QPainter) is done in OpenGL. My project built fine in XCode and runs. However, drawing is slow as hell, in situations where on Windows and Linux machines speed is not an issue...

QJSON using in Mac - getting some issues

Hi, I am using the QJson for parsing. But I am stuck up with some issues. I have used the following code. void CityBook ::getCityList(QUrl url) { //!connect(cityReply, SIGNAL(readyRead()),this, SLOT(httpReadyRead())); cityGuideNetworkAccessManager = new QNetworkAccessManager(this); connect(cityGuideNetw...

Qt4 source code editor widget

Hi there, I want to provide a QtScript source code editor in my application. It would be great if this would have source code highlighting and auto completion. So I don't want to reinvent the wheel: Is there already a quite good widget for that? I could not find anything on Google... Cheers, Manuel ...

multiple sql statements in QSqlQuery using the sqlite3 driver

I have a file containing several sql statements that I'd like to use to initialize a new sqlite3 database file. Apparently, sqlite3 only handles multiple statements in one query via the sqlite3_exec function, and not through the prepare/step/finalize functions. That's all fine, but I'd like to use the QtSQL api rather than the c api dire...

How to make smart installer for ovi applications

Hi, How to make smart installer for Ovi applications? ...

Change system date on Windows using Qt

Hi, What is the most appropriate method to change the system date (on Windows) programmatically using Qt4. I'm using Qt Creator 1.3.1. ...

Macro detect KDE or GNOME in qt4

Hi, I have a problem to detect when used in GNOME or KDE operating system that runs the application. The program I am doing QT4, and I have trouble feeling of look- in the systray, so I pass it to KDE, but which is not macro to do so. PD: I use KDE and C / C. I search in web and I see this: http://stackoverflow.com/questions/963611/creat...

how to stop repainting of a widget when it's resized

hello i am making a software in which paint event painting a widget as per my need but the problem is that when i re-size my application window it painted it again so please tell me the way to stop paint event from painting my widget on resizing the main window. my file are: v_lab.h(http://qt.pastebin.com/tjHAWkPH) v_lab.cpp(htt...

Custom items in Tree View Widget

I'm working on a instant messaging client and i am looking for a way to display the contacts like Pigdin or Yahoo Messenger does. I was looking at a Tree Widget, but is there a way to customize the items? I would like them to look something like this: ...