qt

How to export some data into .rtf or .doc?

Say I have created a GUI (Qt) that operates with some data(text+image). How I can export that data in one of listed formates in title. I guess it is better to export info .rtf as it is free cross-platform formt(??), isn't it? ...

OAuth authentication for Google API with Qt

Hello guys, I'm trying to get authenticated for receiving and publishing Google Buzz-es from a Qt 4.6(c++) application. I'm looking for a cross-platform solution. Could anyone provide some working solution for this purpose? ...

Qt Creator, is it possible to have radio buttons in menu bars?

Hi, I am making a GUI with Qt Creator, Qt 4.6.1 for my c++ application and I cannot find a solution to get radio buttons (or radio button behavior of the menu entries) in my menu bar. I am a newbie to Qt Creator, I hope there is an easy solution for this :-) Greetings ...

A generic C++ library that provides QtConcurrent functionality?

QtConcurrent is awesome. I'll let the Qt docs speak for themselves: QtConcurrent includes functional programming style APIs for parallel list processing, including a MapReduce and FilterReduce implementation for shared-memory (non-distributed) systems, and classes for managing asynchronous computations in GUI applications. For ins...

How to insert item which type is QString to a ComboBox in Qt?

I have an item which type is QString: for example: QString name="Name" the question is: How can I put this name variable into a combobox? I've read the Qt 4.6.2 docs but still cant figure out how to do that. Please dont refer me back to that Qt 4.6.2 docs again.. Please help me ASAP!! this is really urgent! thank you very much!! :) ...

How can let Qt Graphics View Framework support custom layers

Qt's graphics view frameworks is very powerful, but I have not found a way to support custom layers. In Qt, there is a QGraphicsScene::ItemLayer,but QGraphicsScene renders all items are in this layer. I want manage the items with several layers, Just like Illustrator and CorelDraw. all the item only in the current layer will receive the...

How to set font Bold, Italic, and Underlined in Qt?

I want to make a program that's like a simple text editor using Qt 4.6.2. When the user block any text in a TextEdit and click on a button, the text will be bold/italic/underlined depend on the button.. I'm a beginner in Qt Programming, so if Possible, can you insert the programming code in Qt to do that? Please answer this ASAP,, tha...

Qt under Visual C++ 2010 Express

I'm trying to build a basic Qt hello world inside visual studio. I got the moc step to work (i think), but I am at a loss as to how to pass this linker error.. 1>moc_mainwindow.obj : error LNK2001: unresolved external symbol "public: static struct QMetaObject const QMainWindow::staticMetaObject" (?staticMetaObject@QMainWindow@@2UQMeta...

Qt Direct Connection

Hello I have created Qt tree control( and its nodes ) in different thread than the main thread. In the main thread I want to show context menu for the clicked node, so I am connectiong the actions in the menu with appropriate slots in the main thread. The connect function returns true , but slot is never executed. If I explicitly say i...

How to save a file that contains 2 QMap datas in Qt?

I have 2 datas which type is QMap: 1.QMap novel; QString tempChapter; QString tempStory; 2.QMap combo; int tempInd; QString tempChap; my question is: How can I save these 2 Datas into a single file?? And if it's successfully saved, how can I load these 2 datas? Please insert the code too because I'm a beginner C++ prog...

How to play YUV video in Qt4?

I want to play YUV video sequence by using Qt. Now I am using QPixmap, by using DrawPixel on QPixmap pixel by pixel. However, it can't play the video in real-time. How can I do to improve the speed? ...

Coordinate confusion

I subclassed QGraphicsItem and reimplemented paint. In paint I wrote something like this for labeling the item: painter->drawText("Test",10,40); After some time I think It may be useful to handle labeling with seperate item. So I wrote something like this. QGraphicsTextItem *label = new QGraphicsTextItem("TEST",this); setPos(10,40);...

How to provide Input to Dialogs designed by Qt Designer

Hello, I am a Qt beginner and working with Qt Designer to develop some small UI elements. I read http://doc.trolltech.com/4.5/designer-using-a-ui-file.html to use these GUI elements in my code and using multiple inheritance approach. I am introducing bookmark feature which somewhat look like http://img293.imageshack.us/img293/3041/scre...

Features that require Q_OBJECT macro in Qt 4 other than signal - slots mechanism

Hi, I am using Qt 4.5 in windows XP. I know we have to use Q_OBJECT macro for signal - slot connection mechanism. But besides that, is there are any other reasons to use the Q_OBJECT macro? I recently come to know that for some other meta-object features we require the Q_OBJECT declaration. What are those features beside the Signal-slot...

Qt: any way to automatically generate QSharedData-based structures?

Hello. Qt has a build-in supprt for creating objects with integrated reference counting via QSharedData and QSharedDataPointer. All wordks great, but for each such object i need to write a lot of code: QSharedData-based implementation class with constructor and copy constructor, object class itsef with accessor methods for each filed. F...

How do I dynamically allocate memory for arrays in Qt C++ ?

I'm having some issues in allocating memory for an array dynamically in C++ within Qt SDK ... Here's for I'm doing: int dx = 5; QPoint * qPoint; qPoint = new QPoint[dx+1]; However when I try to debug the code, the programs just crashes when it tries to execute the third line .... any clues ? ...

What is the correct way to open and close window/dialog?

I'm trying to develop a new program. The work flow looks like this: Login --> Dashboard (Window with menus) --> Module 1 --> Module 2 --> Module 3 --> Module XXX So, to open Dashboard from Login (a Dialog), I use Da...

How to use iconv in Qt?

I've installed qt-sdk-win-opensource-2010.03 and found an libiconv-2.dll in mingw part of qt distribution. How do I use it (I can't find iconv.h)? Is there a static version of iconv library? ...

Is it possible to connect slots of a model object to the GUI in QT4 -Designer?

So I try to build a Model-View window using QTDesigner and C++. For that reason I created a QOBject derived class as my model. It provides slots and signals to access it like: setFileName(QString) or fileNameChanged(QString). I got a little into using signal drag and drop in QTDesigner and found it quite VA-Smalltalk-Like nice. After a...

Qt training tips and tricks

I have just arrived at new company and have never worked with Qt before, but my task is to learn Qt in 2 weeks, so i can give training to others. So i got 2 weeks to learn Qt and prepare for 2 weeks long Qt teaching. I am so dead! Please point out some common mistakes, tricks, styles so i can make that training a bit better! Thank you! ...