qt

Qt4 existing slots are not recognized.

Hi I am currently trying to complete a project using Qt4 and C++. I am using buttons to switch between states. While trying to connect the buttons' clicked() signals to the textEdit to display the relevant state, I got stuck on an error: Object::connect No such slot QTextEdit::append("move state") Object::connect No such slot ...

Profiling tools for GUI

I'm trying to profile a Qt application that uses a lot of animations. Platform is XP. I am very interested in compating CPU utilization between runs to get a high level view of how changes in the app effect cpu usage. I have tried VTune and Quantify. I can't seem to configure VTune to do what I want. The percentages I am able to gener...

Qt versus WPF/.NET

My company is trying to make the decision between using Qt/C++ for our GUI framework or migrating to .NET and using WPF. We have up to this point been using MFC. It seems that .NET/WPF is technically the most advanced and feature-rich platform. I do, however, have several concerns. These include: Platform support Framework longevit...

Vertical scrollbar scrollup-scrolldown images look jagged on Qtopia machine

I am trying to use a vertical scrollbar in my Qt project. The issue is when use the Cleanlooks widget style for the vertical scrollbar,it looks ok on the Linux Ubuntu machine,where Qt-4.3.3 is running. But,when i run the same project on a Qtopia-4.3.3 Linux(ARM) machine,the scrolldown and scrollup images look totally jagged. They,look ve...

Finding compiler vendor / version using qmake

Is there any way to get the version and vendor of the compiler used by the user through qmake? What I need is to disable building some targets of my project when g++ 3.x is used and enable them when g++ 4.x is used. Any ideas are welcome. Update: Most answers targeted the preprocessor. This is something that I want to avoid. I don't wan...

My qhttp get() call does not work on Windows but does on Linux

Hi, I have written a program that uses qhttp to get a webpage. This works fine on Linux, but does not work on my Windows box (Vista). It appears that the qhttp done signal is never received. The relevant code is: Window::Window() { http = new QHttp(this); connect(http, SIGNAL(done(bool)), this, SLOT(httpDone(bool))); url =...

Beginner Qt signals and slots question

I've just started learning Qt, which is my first experience with GUIs. So far it's just been console apps, and a bit of SDL. I'm getting very confused with this whole signals and slots thing. I've just finished Tutorial 11. When you press shoot, the shoot button sends a signal, which is connected to the slot in the Cannonfield, for the ...

Can I write programs in Qt and sell them as "closed sourced"?

In reference to this question and that Qt is Qt GNU LGPL v. 2.1 , would it be correct to say/simplify: Yes you can, but if you "enhance" the the Qt API you must publish it also? ...

How to scroll automaticaly within a Tkinter message window

Hello together, I wrote the following class for producing "monitoring" output within an extra window. Unfortunately it doesn't scroll automatically down to the most recent line. What is wrong? As I also have problems with Tkinter and ipython: how would an equivalent implementation with qt4 look like? Here is the code: import Tkinte...

In Qt how do I get a button press to set a spinbox to a certain value?

I'm trying to get to grips with Qt's signal and slots mechanism. I have an app with a QPushButton and a QSpinBox. When I click the button I want the spinbox to change to 20. What signal and slot do I need to set up? The code below shows the app, the connect function is the one I am having trouble with. As I understand it the setValue(in...

Wait until QWidget closes

I'm working on a project in C++ and QT, and I want to open a new QWidget window, have the user interact with it, etc, then have execution return to the method that opened the window. Example (MyClass inherits QWidiget): void doStuff(){ MyClass newWindow = new Myclass(); /* I don't want the code down here to ...

QT: creating an "svg image button"

I'm New to QT so please excuse my ignorance. I am attempting to create a an 'svg image button' with QSizePolicy::Preferred for both horizontal and vertical. That part works. When the window is resized, the button grows and shrinks exactly how I want... But the image within the button stays the same size. I would like the image to scale ...

Can Phonon be used for capture or transcoding?

Qt/KDE's Phonon media framework abstraction implemented playback first. Can it do anything more complicated yet? ...

In qt, how do I implement a widget that stays consistent with variables in the code.

Here's a sample of a SpinBox that writes its changes to underlying variables. The main problem that I'm having is valueChanged is called when the widget is constructed. Is there a more elegant way to do this? I think it's weird that I connected a widget to itself, but valueChanged isn't virtual. class ValueWriterInt: public QSpinBox ...

What's the difference in the Visual Studio integration tools for Qt?

Trolltech has released a tool called "Visual Studio add-in" for their LGPL and GPL release of Qt. They state that the commercial version comes with a full Visual Studio Integration tool but I don't see any description of the differences between these. What's included in the full version that isn't in the add-in? ...

Mystery: In Qt, why would editorEvent be called, but not createEditor?

I'm subclassing QAbstractItemDelegate. This is my code. Suggestions are welcome: QWidget *ParmDelegate::createWidget(Parm *p, const QModelIndex &index) const { QWidget *w; if (index.column() == 0) { w = new QLabel(p->getName().c_str()); } else { if (p->isSection()) return NULL; w = p->createControl(); ...

Animation with QTimeline

I'm using QGraphics objects to display boxes with arrows between them. I want animation on those arrows/lines that starts at one end and goes to the other. The animation works great when the start and end locations of the arrow don't change during QTimeLine execution, i.e. I leave the view static. But since the user can drag the boxes a...

Is there a way to list current processes using Qt on windows ?

Is it possible to know which processes are running using Qt 4? I'm looking for a way to wait until an application is closed by the user to make an operation. ...

Is there a way to set the DPI of a QPicture?

Is there a way to set the DPI of a QPicture? ...

Qt: adapting signals / binding arguments to slots?

Is there any way to bind arguments to slots ala boost::bind? Here's a for-instance. I have a window with a tree view, and I want to allow the user to hide a column from a context menu. I end up doing something like: void MyWindow::contextMenuEvent (QContextMenuEvent* event) { m_column = view->columnAt (event->x()); QMenu menu; ...