qt4

Mysql Plug-in for Qt

I've installed recent Qt (4.5.3) sdk windows version. I'm want to use mysql in my app. Since Qt Mysql plugin in not available, so I compiled it from the included source. I copied compiled files D:\\Qt\2009.01\qt\plugins\sqldrivers. Now when I run my application it still error "QMYSQL driver not loaded". ...

implement thread for consuming operations in Qt

Hello, I have never worked with QThread in Qt, or with threads in general, so the topic is more then new to me. Still I have to use QThread's in order to avoid the blocking of my main application due to some heavy computations. So I want to put my heavy computations in a thread and if they take too much time I want to kill the thread (...

Problem between a QTcpServer and a TCPClientSocket (Cayuga)

I try to communicate via TCP Socket between a QT4-Application (MyApp) and Cayuga (written in C++). The connection part works fine, i.e. Cayuga connects to MyApp. Now, MyApp is sending some data to Cayuga, but nothing is received. void MyApp::init() QTcpServer *m_server; QTcpSocket *clientConnection; //Open socket for transmission m...

PyQt: Displaying QTextEdits over the window

I want to display some QTextEdits over my main window at arbitrary locations. Below is my first attempt. It doesn't quite work. If I create the text edits before I show the window, the text edits appear, but if I create them after I have shown the window they don't appear. What's up with that? How can I get the ones created later to...

including path for pro file in Qt

Hello, I have the following tree structure of a library: -1.axel -2.trunk -3.axel -4.src -3.knot -4.axel -5.QComplexInvariants -QComplexInvariants.pro -3.subdivix -4.include -3.realroot -4.include -3.linalg -4.include -3.shape -4.include In QComplexInvariants I have sev...

How to hide Services item in QMenubar on Mac OS X?

In my Qt4 application I can't seem to hide certain options in the system Menu bar on OS X such as 'Services'. Any ideas? ...

Libqxt under Qt Creator

I want to create a tiny app which needs global shortcuts. So, I have downloaded the current version of libqxt (0.5.1) and opened as a project in Qt Creator. Libqxt compiles without problems in this way, so I thought that adding this in the tab Dependencies of my project it would get added automatically in the build, like Eclipse does wi...

Question about a QList<QStringList> in Qt

I'm using Qt 4.5 and im working with a QList<QStringList> which is a list of string list. Now I want to replace one string inside one stringList but with it seems unusual to type. I have found the following way of doing it and was wondering if it is ok: QList <QStringList> pDataList; pDataList[listIndex].replace(QStringIndex, newStri...

std::unique analogue in Qt?

I have browsed the documentation, but didn't find one. Any ideas? ...

Help Recommend Qt Opensource Project

Hey, I just finished half of "the C++ GUI Programming with Qt 4". I wanted to find some small-scale or medium-scale opensource projects that are built on Qt 4, then I can learn something from the source code. Could anyone recommend some projects from your experience when you start to learn Qt? Thanks a lot. ...

Using a QListView or similar effectively in Qt4

Hello, I am slowly getting used to using the Qt4 GUI framework. In a project I am working on, I need to be able to add/edit/remove Team objects in a list. Coming from a C#.NET perspective, I would do something like List<Team> teams = new List<Team>(); teamsListBox.DataSource = teams; teamsListBox.DisplayMember = "Name"; Then use butt...

Is there a way to emulate a QGroupVBoxLayout?

I am using Qt designer and I know how to use a QVBoxLayout and QGroupBox but it seems there is no such thing as a QGroupVBoxLayout. So I have to put a QVBoxLayout inside of a QGroupBox but if I modify the dimensions of one I have to do the same to the other. Is there a way to make them change dimensions together directly from QT design...

How to find global position of text cursor?

Hi all, I would like to execute a QMenu object at the position of text cursor in a QPlainTextEdit. My problem is that QTextCursor is only define by its position in the Text (index of the character). How can I find global position of the QTextCursor? Should I use an other object than QTextCursor in order to find the position of the text...

Problems communicating with external editor in Qt4

I am writing a command-line Qt4 script (using QCoreApplication) on Mac OS X. I am using this code adapted from C++ Programming with Qt 4, 2nd ed. p. 313: QTemporaryFile outFile; if (!outFile.open()) return; QString fileName = outFile.fileName(); QTextStream out( out << initial_text; outFile.close(); QProcess::execute(editor, QStr...

Subclass of QGraphicsLayoutItem for stretchers?

The specializations of QGraphicsLayout (e.g. QGraphicsLinearLayout) include an insertStretch method. What kind of object do QGraphicsLinearLayout::insertStretch method insert in the list of items managed by the layout? Better asked: what type of object is returned by QGraphicsLayout::itemAt method when called for a stretch position? ...

load libavcodec in Qt-Projekt

Hi. I want to include the libavcodec in my Qt-project. Should I do that with #include <ffmpeg/libavcodec.h> or with something more Qt, for example QLibrary mylib("libavcodec"); And also a question to understand if I really got it: To use libavcodec, do I need to import the source-files or the .dll? ...

Qt Linking Error.

...

How to set selected filter on QFileDialog?

I have a open file dialog with three filters: QString fileName = QFileDialog::getOpenFileName( this, title, directory, tr("JPEG (*.jpg *.jpeg);; TIFF (*.tif);; All files (*.*)") ); This displays a dialog with "JPEG" selected as the default filter. I wanted to put the filter list in alphabetical order so...

QT 4.5 - Changing the selection marquee for QGraphicsItem

Is it possible to define the style of the selection marquee when a QGraphicsItem is set selectd via setSelected(true)? ...

Qwt log10scaleEngine causes weird filling of the curves

Hello. I'm using qwt chart package and have encountered a problem. I've tried to combine few examples from the web-page into one, and log10scaleEngine behaves strange together with curves that are filled with color. The problem is with switching to log10scale: the curves are filled upwards (instead of downwards): 1) linear scale, 2) lo...