qt

What's A QT Or Open Source C++ Template For Ordinal Sorting

Hi, I am looking for a special template class, hopefully either a QT template or a self-contained open source library. This template class is intended to act as a container for a set of objects. Each object in the set has an integer-valued weight function but the weight function itself is arbitrary. It could range uniformly from 10 to ...

Qt Python : QTreeWidget Child Problem

Hello Everybody, I have a QTreewidget that works fine if I have just one level on my treelist. If I decide to add child sublevels, it gives me an error. Here is the code, that works nice only without the "childs" lines on it (see after "child 1" and "child 2"). def eqpt_centralwdg(self,MainWindow): self.centralwidget = QtGui.QWidg...

C++ version of Java PropertySheet

Previously, I am able to use PropertySheet provided by http://www.l2fprod.com/common/index.php When I pass in an Java Object, a GUI windows will be created automatically, to display the property of the object. User will able to view and edit the properties of the object. For C++, I know it is difficult to obtain object's properties dur...

How make Qt Designers autosize layouts work with Pyqt4?

I'm trying a simple example with Qt Designer and Pyqt4, when I preview the UI in Qt Designer (control+R) it looks good, but when I try to execute the generated UI code, layouts don't work properly and instead of autosizing widgets to the max they are so small that they can't be used. If I use fixed sizes it works well. The code used to...

Outlook shortcuts style toolbar in Qt

Is there any way to create outloook shortcuts style toolbar in Qt? Should use normal toolbar and try to style it somehow (I have little idea how to achieve this)? Or does Qt provide builtin widget for this? I am talking about toolbar like on this image: http://www.winsupersite.com/images/reviews/outlook2k2%5F01.gif ...

How to access images loaded from css in Qt Webkit (java)

Hi, In Qt WebKit you can call QWebFrame.renderTreeDump() to see the render tree. For images in html <img src=...> you get something like: RenderImage {IMG} at (0,0) size 174x71 However, there is no render information for images loaded from ccs (backgrounds etc). Is there a way to access these? I'd also like to be get the urls of ...

How to solve QPixmap::fromImage memory leak?

Hello everyone! I have a problem with Qt. Here is a part of code that troubles me: void FullScreenImage::QImageIplImageCvt(IplImage *input) { help=cvCreateImage(cvGetSize(input), input->depth, input->nChannels); cvCvtColor(input, help, CV_BGR2RGB); QImage tmp((uchar *)help->imageData, help->width, help->height, help->w...

Qt Python radiobutton: activate event

Hi Everybody, I am developing a project for one customer, where the design has a radio button with exclusive options. Here is a piece of the code that runs and show two nice radio buttons: self.performGroupBox = QtGui.QGroupBox(self.centralwidget) self.performGroupBox.setGeometry(QtCore.QRect(50, 20, 181, 121)) self.perfo...

Qt4.5: Using event-loop based localsocket before app.exec

I'm facing a practical problem with Qt. I'm using a class that communicates with QLocalSocket to another process (pipes/unix sockets) and I need to do that communication before other events occur, that is before app.exec() starts (or more precisely,as soon as app starts). The class that I'm using needs an eventloop so it does not work i...

How to make modeless dialog stay on top of its parent in Solaris CDE

Hi, I have a problem with Qt modeless dialog in Solaris 8/10 machine using CDE (Common Desktop Environment). The dialog serve as drawing panel/popup that required user to choose the tools from main application before proceeding to draw on it. The problem is whenever user click on main application toolbar, then the dialog will goes beh...

Receive WM_COPYDATA messages in a Qt app

I am working on a Windows-only Qt application, and I need to receive data from a Microsoft OneNote plugin. The plugin is written in C#, and can send WM_COPYDATA messages. How do I receive these messages in a C++ Qt app? I need to: Be able to specify the "class name" a window registers as when it calls RegisterClassEx, so that I can ma...

Linking GUI app against a static lib in QtCreator

Hi, What is the right way to build a library from source using MinGW and then reference it in the GUI application's project? I'm not familiar with gcc and makefiles, but I think there must be a utility which generates makefiles from existing source. The library itself doesn't depend on anything except the standard C lib. Thanks! ...

how to add an widget into the Form In QtDesigner

in qdesigner_workbench.cpp, how can I add a widget (say QLabel) into a FormWindow by code? Since methods like createWidget()...etc are all abstract, how do I properly use the internal mechanics to add QLabel into the active FormWindow? EDIT: In qdesigner_workbench.cpp, this is currently what I have: QDesignerFormWindowManagerInterfac...

Select audio channel using Phonon

Having a simple QT application which plays media files using Phonon, is it possible to switch between the audio channels (e.g. different languages) ? ...

Compile Qt application for Windows Mobile 5

Hi, I'm trying to compile a small Qt application for windows Mobile 5. so I've few questions: currently i'm using ubuntu 9.10, I've hear some thing about cross-compilation but I din't found a real example of have to do it. Will it be possible to compile from linux? How to compile an application for mobile anywhere(windows(VS, mingw,et...

Qt moc_ include file problem

I'm trying to compile the basic tutorial program at http://doc.trolltech.com/4.4/mainwindows-application.html and running into a problem. Doing things the way the tutorial program does them, gives a compile error: In file included from debug\moc_mainwindow.cpp:10: debug\../mainwindow.h:2: error: expected class-name before '{' token deb...

Any readings/books recommended for a beginner mobile Qt developers?

I'm quite new to this mobile development. I just download the Qt SDK from the Nokia web site. My background is C,C++ and I am not very familiar with the visual/IDE kind of stuff. Normally I do things using the console and the vi editor, etc. I have been spending almost 10 years of development mainly on web applications (PHP/Python/Flex...

How to execute program which have created Qt on windows?

Hi. Basically, Qt provide the cross-plateform. I have made a application which is used Qt creator on Linux. But, I can't be running that on Windows because it can't find .dll files such as mingw10.dll and qtcore4.dll, etc. So, I have copied the .dll files which can be found in qt/bin directory. And, I create a directory in order to ...

Format the output of qDebug for QMaps

Hi, i am currently in the process of maintaining a legacy app. This has quite a few structures like: QMap<QString, QMap<QString, QMap<QString, QMap<QString, QVariant> > > > Dep; As interfaces are hardly used and I only need to make minor adjustments, I would like to keep the structure as it is, although some refactoring might be nee...

Qt invokeMethod with QString

I have a daemon running on DBus that offers service for launching applications. I want to pass two strings to this service API (appPath, appArgs). I have registered the service and the object path with DBus. My service method gets called, but I do not receive the arguments properly () in my service. This is how I'm doing it from my adap...