qt

QNetworkAccessManager/QNetworkReply with custom QTcpSocket?

Hi Is there any way to replace QSslSocket used by QNetworkAccessManager with my own implementation? I was really looking forward to use WebKit!! I'm working on attaching PKCS11 implementation to our Qt based software. So far the only way I found is to use QHttp - but doc says that this class should not be used.. I find QNetworkAcces...

Qt Animation: Appearing & Disappearing Objects

I'm writing a video annotation application with Qt4 in which users need to be able to seek to various points in a video, putting markers on various objects and then setting keypoints for those markers so that they stay on the objects in the video as they move around. QGraphicsItemAnimation seems like a great place to start for these mar...

How to force Java/awt to use a specific toolkit (qt)?

I am working on an embedded Linux device that has only qt. For some reason, Java decides to use gnu.java.awt.peer.gtk.GtkToolkit. How can I force it to use gnu.java.awt.peer.qt.QtToolkit instead (or change the default behavior)? ...

QT4: Is it possible to make a QListView scroll smoothly?

I have a QListView in Icon mode with lots of icons, so that a scrollbar appears, but the scrolling is not smooth and this IMHO confuses the user since it jumps abruptly from one point to another at each scroll. I would like to make the scrolling smooth but I didn't find anything in the docs. Is it possible? ...

Sorting an XML file with Qt

Hi how to to sort an XML file using Qt my file look like this : <?xml version="1.0" encoding="UTF-8"?> <project> <task next="2" first="1" name="2" value="name1"/> <task next="3" first="1" name="1" value="name2"/> <task next="4" first="3" name="4" value="name3"/> <task next="4" first="1" name="6" value="name4"/> <t...

Animation in Qt 4.6

I've a block of code where I've used Qt's new animation framework. I needed the animation just in that block of code and I don't need the animation related variables in other places. Clearly, the animation won't work if it is destroyed before the animation completed. For example, the following doesn't work: if (animate) { QPropertyA...

Cross Platform C library for GUI Apps?

Free of charge, simple to learn/use, Cross Platform C library for GUI Apps? Am I looking for Qt? Bonus question: Can I develop with the said library/toolkit on Mac then recompile on PC/Linux? Super Bonus Question: Link to tutorial and/or download of said library. (RE)EDIT: The truth is that I'm in the process of catching up on the C...

How to draw & export a transparent image with Nokia Qt C++ ?

I have a piece of code intended for drawing & exporting a transparent image with Nokia Qt. However, it does not work. I always see black background with lots of noise. I must fill the background with White color but I want transparency, not white color. Please kindly advise. #include <QtGui/QApplication> #include <QtGui> int main(int a...

Linux+Language for video capture & Display

Hi all, Very soon we are going to work on a project with open source s/w that does many things and one of the modules concerns with capturing live feed from a usb based camera for upto 48 hours and overwriting it in a nonstop loop. This would be going on in parallel with other operations in the application. We also have to display the c...

Qt tr for internationalisation does not work in main function?

Qt's translation function tr does not work in the main function but works fine in a QWidget member function. Why is that? int main(int argc, char *argv[]) { QApplication a(argc, argv); QDialog dialog; QString temp = tr("dadasda");//error:tr was not declared in this scope dialog.show(); return a.exec(); } ...

Aligning QTabBar from stylesheets

I am trying to align position of tabs in QTabBar to the left. Does any one has any idea? I was able to do this when I was using QTabWidget using style-sheet. Now, I have restriction that I cannot use QTabWidget. So have to do this in tab-bar. Any help is highly appreciated. ...

Qt, VS2005, Qwt - Can't use Q_OBJECT in class derived from Qwt widgets

We've compiled QT 4.6 and QWT 5.2.0 for VS2005. We're trying to derive a class from QwtDial, and the derived class has slots. So, we need to add the Q_OBJECT macro. However, when we do that, the linker chokes out this error: error LNK2001: unresolved external symbol "public: static struct QMetaObject const QwtDial::staticMetaObject" ...

Issue with Qt slider signal/GUI

When a user moves the slider it will trigger a signal and based on that I want to call a method readData from dataClass, to return me a string and then print it in guiClass. But it does not work. I get Program received signal: “EXC_BAD_ACCESS”. I am using Xcode. As soon as I move the slider the program crashes and highlights line 9. 1...

(C++ QT) QList only allows appending constant class objects?

I'm pretty new to QT. I've been messing with it for a week now. I came across a error while I was trying to add a custom datatype to a Qlist like so QObject parent; QList<MyInt*> myintarray; myintarray.append(new const MyInt(1,"intvar1",&parent)); myintarray.append(new const MyInt(2,"intvar2",&parent)); myintarray.append(new const MyI...

How can a QToolBar know where it is?

In Qt, when moving a QToolBar, one can use the QToolBar::topLevelChanged(bool) signal to know if the the QToolBar is floating or docked. When the QToolBar is docked, how can one get the Qt::ToolBarArea (LeftToolBarArea, RightToolBarArea, TopToolBarArea, BottomToolBarArea) where the QTookBar is docked? Thanks. ...

Qt Fold/Unfold Widget?

It there a widget like this: It should be able to show/hide some contents under it. ...

Platform independent way of setting a unhandled exception handler using Qt?

Mac OS X (Cocoa) NSSetUncaughtExceptionHandler Windows SetUnhandledExceptionFilter Is there a platform independent way to do this using Qt? ...

Qt use-case for same signal to 2 slots on same object?

I am a total newbie to Qt. As I was reading the documentation, I came across this configuration: connect( Object1, Signal1, Object2, slot1 ) connect( Object1, Signal1, Object2, slot2 ) What could possibly be the use-case for this? Looks odd to me coming from an Erlang/Python background. It must have to do with C++ inheritance twists ...

How can a Qt client talk to a Spring server application?

Is there any integration library/framework available? If not, what would be the best way to achieve this integration? Thanks in advance. ...

How to make exe in Qt?

Hi, I'm starting to learn Qt and I'm stuck on particular step, which is: I cannot create executable file. My steps are as follows: Creation of *.cpp In console typing qmake -project (this creates .pro file) In console typing qmake -makefile (now I have makefile + some other files) I'm trying to create .exe by typing qmake but this isn'...