qt4

How to put an image and a QProgressBar inside a QTableView?

I'm developing some kind of download manager and display the file name, it's size and the remaining bytes in a QTableView. Now I want to visualize the progress with a QProgressBar and display an image (to indicate whether it's an down- or upload). How can I add or display a QProgressBar and an image inside the QTableView? ...

What features or concepts annoy you in Qt?

Qt is a nice framework and great UI toolkit and it has many useful features and concepts. Most of us probably agree that Trolltech, lately Nokia, have done pretty nice job developing it. One of the latest advances in Qt is QML, which I find fascinating advancement. However, I find some of the concepts badly designed or badly implemented...

QT Plugin , VTK QT Widget , Multi-thread and Linking question?

Greetings all, This is going to be a long question,skip the [Background] if its not that neccasary ;) [Background] I am developing a modular QT based application.Application is extentible via QT based plugins. As shown in the figure, there are mainly 3 parts .(numbers in red) 1) libAppCore - the core of the application,which defin...

How to add additional dlls to a .pro file?

hi, am using visual studio for my project, and i need to include a lib/dll in my application. i have included the lib for the same and compiles fine, however when i try to run it, gives me an error saying that it could not find the specified dll, adding this path in the env variable PATH solves the issue, but i do not want to do it every...

how to print a QGraphicsScene that has text and graphics

I have a QGraphicsScene that has graphics as well as text drawn on it. When I try to print, the graphics are fine, but the text is using a font size defined in points, so scene->render() when I pass it a QPainter initialized with a QPrinter, has VERY large text. How am I supposed to print a QGraphicsScene that has text on it? edit: H...

How to trigger the edit mode of an item in a QTableView?

I'm using QTableView and QStandardItemModel now. In the QTableView, if you double-click a cell, this cell will get into edit mode and you can edit its content. Now I have a problem, I want to trigger the edit mode of an item by code (by command), what should I do? I cannot find proper function or slot in QTableView or QStandardItemMode...

multithreading: how to process data in a vector, while the vector is being populated?

I have a single-threaded linux app which I would like to make parallel. It reads a data file, creates objects, and places them in a vector. Then it calls a compute-intensive method (.5 second+) on each object. I want to call the method in parallel with object creation. While I've looked at qt and tbb, I am open to other options. I plann...

How to anchor QGraphicsWidget/Item (make them static) on QGraphicsView

Hi, I want to make something like a hud. I have a QGraphicsScene with a huge QPixmap, that I added to a much smaller QGraphicsView. Now I need to add some control elements, like QLabel, QPushButton and QGraphicsEllipseItem. That's, I think, is not a problem. I found this helpful page Graphics View Classes. But how do I anchor this cont...

How to get right row height in Qt for QTableView object?

From this screenshot you can see a lot of space inside the rows: I've used these functions to get resizing: resizeRowsToContents(); resizeColumnsToContents(); How can I get a better fit for cells/rows sizes? ...

Having trouble integrating qt-addin and vs2008

Hi all: i wrote this simple programme which did not pass the compiling phase using vs2008 IDE while it is successfully built using qt-creator. #include <QtGui/QApplication> #include <QtGui> int main(int argc, char *argv[]) { QApplication a(argc, argv); QPushButton w; w.show(); return a.exec(); } The error info is listed below: ...

Using PyQt4 with bbfreeze - wrong ui style used

Hi So to give a little context, my goal here is to produce a binary which will run my Python/PyQt4 application on any recent linux (but mainly ubuntu), without requiring the user to install the pyqt4 or pyqwt5 library. (If anyone can give a better way to do that than my method below, that would be great also :) I've got this mostly wor...

Artefacts when drawing a scaled QImage onto a QWidget

Hi there. My main window has the following draw-function: void MainWindow::paintEvent(QPaintEvent*) { QImage sign(50, 50, QImage::Format_ARGB32_Premultiplied); QPainter p(&sign); p.setRenderHint(QPainter::Antialiasing, true); p.fillRect(sign.rect(), QColor(255, 255, 255, 0)); p.setBrush(Qt::blue); p.setPen(Qt::N...

How to draw an ellipse/circle over QGraphicsScene in a QGraphicsView

Hi, I have a QGraphicsView with a QGraphicsScene. That QGraphicsScene contains a QPixmap. It is possible to drag the scene. On top of that scene I have a HUD with QLabels, QPushButtons and other stuff. When I drag the scene around, the HUD elements never change their position. So far it works all perfect. But now I need to add a new el...

Install QJson in Mac

Hi, How to install the Qjson in mac? Thanks in advance. ...

Initilizing value for a const data

Following code is in my c++ class static const QString ALARM_ERROR_IMAGE ; i want to initilize ALARM_ERROR_IMAGE = "error.png"; Is it possible to initilize error.png to static const QString ALARM_ERROR_IMAGE Want to keep it inside class ...

How to keep static const variable as a member of a class

Hi, I want to keep a static const variable as a member of class. Is it possible to keep and how can i initilize that variable. Some body helped by saying this QString <ClassName>::ALARM_ERROR_IMAGE = "error.png"; http://stackoverflow.com/questions/3698446/initilizing-value-for-a-const-data I tried like this in CPP class i write...

How to Widget inside another widget in QT?

hi how to add widget inside widget i created main widget, and for the main widget headerbar come from another widget. here the code below main.cpp #include <QApplication> #include "mainwindow.h" int main(int argl,char *argv[]) { QApplication test(argl,argv); mainWindow *window=new mainWindow(); window->setWindowState(Qt:...

How to add an arc to the foreground of a QGraphicsView

Hi, how is it possible to add an QPainter arc to the QGraphicsView foreground. I found QGraphicsView.drawForeground (self, QPainter, QRectF), but I don't understand how to use it. I am new to qt. I also know that it is possible to add an art to the QGraphicsScene, but I need the scene for something else. Or is there an easier way to a...

how to calculate qfont pixel size from point size

How do I convert my font on a QGraphicsObject from point size to pixel size? I need to do this so the fonts will look right when I print my QGraphicsScene using QGraphicsScene::render(). ...

Widget display problem in QT?

Hi., i am trying to create layout like this (Please see the Picture) http://i225.photobucket.com/albums/dd200/saravanan_comp2001/layout.jpg In the QT i created widgets and put in the main widget, the problem is not visible. none of the widget's are not shown. please help me to fix this issue Complete Source Code sandbox.ifuturemec.c...