qt

Web interface for c++ applications

Hi, Our company has a set of 3d modeling softwares written in c++ with qt based gui. We are planning to offer these applications to customers to try them from a web browser. I mean to say, we need to create web interfaces for native c++ codes. Please suggest me which technology, languages should be used. If possible please give some...

List machine's serial ports [Qt4]

I have an arduino-based device which connects through USB. I'd like to detect it from my Qt4 application, using QExtSerialPort (or whatever necessary), when it's plugged in. If this weren't possible, I thought I could somehow get a list of the system's port names and just try all of them in search for my arduino (where I'd implement s...

Qt qmake - how to stop it adding rules to delete the target

I am trying to add a unit test to a group of other tests. All the tests are in their own subdirectories, each with it's own .pro file and the .cpp file which contains the tests themselves. Running qmake in one of the subdirectories creates a Makefile, and then running make runs the compiler to make the TARGET. The tests are actually run ...

How to check if file is/isn't an image without loading full file? Is there an image header-reading library?

edit: Sorry, I guess my question was vague. I'd like to have a way to check if a file is not an image without wasting time loading the whole image, because then I can do the rest of the loading later. I don't want to just check the file extension. The application just views the images. By 'checking the validity', I meant 'detecting and...

What is the best way to visualize large data sets in QT

Hey! I am working on a Qt project, which require visualization of very large data sets (time + value measurements). By very large I mean millions of values. I need to support scrolling across these values and zoom-in/out operations in the time axis. The ultimate zoom-out should show all the data set sub-sampled to match the window widt...

how to display image from array of colors data in Qt?

I have a char* data, where every char represents red/green/blue/alpha value of a pixel. So, the first four numbers are red, green, blue and alpha value of the first pixel, the next four are R, G, B, A value of the pixel on the right and so on. It represents a picture (with previously known width and height). Now, I want to somehow tak...

Scrolling different Widgets at the same time

Hi all! I have different types of QWidgets into a DockWindow: 1 Qwt plot 1 QWidget 3 QGraphicsView And I need scrolling all of them at the same time with the same scrollbar when I zoom in. I know two solutions for this: Create one scrollbar and connect it to each widget. Create one scrollArea and manipulate all the widgets. What...

QTextCodec subclass - how to register my codec

I need to create my own codec, i.e. subclass of QTextCodec. And I'd like to use it via QTextCodec::codecForName("myname"); However, just subclass is not enough. QTextCodec::availableCodecs() does not contain my codec name. QTextCodec documentation does not cover the area of proper registration of a custom codec: Creating Your Own Co...

setCentralWidget() causing the QMainWindow to crash.. Why?

MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { this->setupUi(this); this->setupActions(); this->setWindowTitle(tr("CuteEdit")); label = new QLabel(tr("No Open Files")); this->setCentralWidget(label); label->setAlignment(Qt::AlignCenter); } By above code, I get a GUI like ...

Event handler when user manually shutsdown system.

Hello All, I need a event handler when ever shutdown message is send to system. Can anyone help? When ever we try to shutdown a system, and if any dialog box is open shutdown process terminates. I don't want this to happen in my application. i.e if any dialog box is open from my application and I try to shutdown my system then it shoul...

Question about Qt slots and multiple calls

I am just learning Qt and have a very basic question. If there is a (function scope) variable in a slot, and the slot is called multiple times, each time before the last call has returned (is this even possible?), will the variable be overwritten each time? In the sense that, if the slot is called before the previous run has returned, ...

Creating Qt models for tree views

I'm writing an application in Qt (with C++) and I need to represent an object structure in a tree view. One of the ways to do this is to create a model for this, but I'm still quite confused after reading the Qt documentation about the subject. The "structure" I have is pretty simple - there's a Project object that holds Task objects in...

Qt Python - report in toolbox: QTextDocument and QPainter

Hi Everybody, I want to build multiple documents report using toolbox. Two pages is an option get a start. Formatting is ok, and can be worked latter. I tried using QTextDocument in Html, and alternatively QPainter. Of course, to make a test and keep things simple, I just ask in Qt to show the report title displayed on top of the docu...

Qt question to fullscreen flash application

I am using Qt to develop an application and inside we have access to select flash streaming videos like youtube. Is there a way to programmaticly full screen the flash application without requiring interaction from the user? I am using a "QWebView" control. ...

Laying out overlapping rectangles

I am trying to layout a bunch of overlapping rectangles that start out like this: The 2-pass algorithm I thought up is roughly: // Pass 1 - Move all rectangles to the right until they do not overlap any other rectangles rects = getRectsSortedOnTopLeft(); // topmost first, all rects same size foreach(rect in rects) { while(rect.col...

Python Hierarchical QcomboBox: clean-up list

Hi Everybody, I have a hierarchical two combo-box. The first combo-box displays a list of customerNames, i.e. different companies from a MySQL db. Each customer has branches in different cities. Then, when a customer name is chosen from combo-box1 option list, e.g. {Aldi, Meyer, Carrefour, WalMart}, for that particular customer, a list...

Web Interface identical to Qt user interface

I'm working on a embedded system with a display. The user interface was developed using Qt. How can I develop a web interface that looks identical to the existing Qt interface, and gives the same user experience on the web. The Qt GUI is accessing the device functionalities through an interface library. Is there a way to generate web ...

Order of QObject children (strategy question)

For one of my projects I have a tree of QObject derived objects, which utilize QObject's parent/child functionality to build the tree. This is very useful, since I make use of signals and slots, use Qt's guarded pointers and expect parent objects to delete children when they are deleted. So far so good. Unfortunately now my project req...

python qt raise syntax error

I have a top level widget that is producing a syntax error in python. raise() on line 15. This is using the python Qt bindings. I know that raise is a python reserved word. I am looking for how to call the Qt "raise()" function with the python bindings. #!/usr/bin/python # simple.py import sys from PyQt4 import QtGui app = QtGui...

How to do precise mouse event handling in QGraphicsScene when ItemClipsChildrenToShape is enabled?

I have a QGraphicsItem that clips its child items (I enabled its ItemClipsChildrenToShape flag). I noticed that clipping makes assigning the mouse event to the children items imprecise: instead of the precise shape of the items their bounding rectangles are used for detecting which item is located at the specific position so the children...