qt4

how to use Qt setWindowFilePath

I can't seem to get setWindowFilePath to work in any of my projects. The value is stored and can be retrieved, but it never shows up in the title bar of my app. It does work correctly in a sample app I downloaded, but I can't find what they do differently. Anyway, here's a simple app I created to demonstrate the problem. I pasted the...

Win7 MInGW QT MySQL program screams "cannot find -lqsqlmysqld"; where is the missing library?

Hello everyone. I am attempting to make a qt program on Windows 7 that uses a MySQL plugin. I have compiled both qt and the mysql plugin with no problems using my minGW 32bit compiler. However, I keep on getting an error like this: mingw32-make -f Makefile.Debug mingw32-make[1]: Entering directory `C:/Users/dhatt/Desktop/testdb2' g++...

in Qt we uses more pointers, is there any advantages?

Hi, i have some clarification regarding Qt programming. In Qt most of the time we instantiate widget by allocating the memory dynamically. is there any advantages of doing like this from Qt prospective? and what about de-allocation of memory for the widget?. do we need to manually call delete for the allocated memory or Qt handles? E...

${QT_LIBRARIES} in cmake

${QT_LIBRARIES} seems to turn out as "" when I do message("${QT_LIBRARIES}") and have a general suspicion that it is no being set properly. In fact it doesnt seem as if any of the attributes are being set properly by find_package(Qt4 REQUIRED). Any ideas? I have also tried find_package(Qt4 4.6.2 COMPONENTS QtCore QtGui REQUIRED ) and I...

'QObject::QObject' cannot access private member declared in class 'QObject'

class CHIProjectData : public QObject { public: CHIProjectData(); CHIProjectData(QMap<QString,QString> aProjectData, CHIAkmMetaData* apAkmMetaData = 0, QObject* parent = 0); private: QMap <QString,QString> m_strProjectData; CHIAkmMetaData* m_pAkmMetaData; }; CHIProjectData::CHIProjec...

Qt4: Read Default mimeData from QAbstractItemModel

What I want to do is very similar to this. Except that I am working with a QAbstractItemModel that has a tree structure and am interested in more than just the row and column. In fact, in my model, column is always 0. But in order to implement drag and drop, I need to get the parent, children, and the opaque pointer that internalPoint...

how to force matplotlib to update a plot

I am trying to construct a little GUI that has a plot which updates every time a new data sample is read. I would prefer not to run it with a timer, since the data will be arriving at differing intervals. Instead, I'm trying to make an implementation using signals, where the data collection function will emit a signal when data is read...

3D text on QGLWidget in Qt 4.6.3

Hello. I'm looking for a simple way to draw 3D text on QGLWidget without using FTGL, FreeType, "render to texture" or framebuffer objects, i.e. using documented Qt 4 functions only, no additional libraries. Ideas? P.S. "3D text" means that letters are flat and have zero thickness, but can be rotated in 3D space. Think about "Star war...

Qt SSL support missing

I've just downloaded Qt (LGPL - Qt SDK for Windows) and when i run some of the demos they complain about Qt not having SSL. How can i get the Qt SDK with SSL enabled? Do i really need to compile it from source to get SSL support? Why is it missing in the version i've downloaded? ...

Phonon on windows XP cant load DS backend which definitely exists

I am experiencing problems with phonon direct show backend on WinXP. Basically it doesn't work at all for me I've tried it with both 4.7.0 SDK and with version built from sources. In both cases phonon_ds94.dll is located in /plugins/phonon_backend/ dir. My system is WinXP and I use VS 2008. Here how I create video player: vp = new Pho...

How to make QTabWidget without pages

I with to use the tabs of QTabWidget but I don't need the pages as containers. I need only the tabs. Is there a way I can hide or disable the page containers and display only the tabs? ...

Setup QTabBar position

If I use QTabWidget i can call setTabPosition to change it to "South" and have tabs appear at the bottom. Is there a similar behavior for QTabBar? Currently on Mac the top left and right corners are rounded and the bottom ones are not. I wish to invert this look and feel - the top corners to be square and the bottom ones to be rounded. ...

QMainWindow with only QDockWidgets and no central widget

We have a window with several components in QDockWidgets. Ideally, we'd like to have all components dockable, but there is one component that will likely always be visible. So we made that the central widget. However, this does not allow us to create a tabbed stack of dockable widgets (as you can create by e.g. calling tabifyDockWidge...

QT / CE on Windows CE 6.0, app won't run

I'm a .NET CF developer trying to move to QT/CE. I'm trying to port one of my app written in .NET CF to QT/CE targeted run on Windows Embedded CE 6.0 GPS made by China. I don't have access to original SDK (china manufacturers don't provide them) so, as QT mailing lists suggested, I used Windows CE 5.0 Standard SDK as my option. Here is m...

Nokia Qt SDK and Qt Mobility API

It looks like Nokia Qt SDK does not provide QtMultimediaKit with the package which is a part of Qt Mobility API 1.0.2. e.g. I cannot use QMediaPlayer to play *.mp4 file (Simbiot^3) QMediaPlayer *player = new QMediaPlayer; playlist = new QMediaPlaylist(player); playlist->append(QUrl("http://example.com/myfile1.mp4")); playlist->se...

How to encode URL parameters in QT?

I have the following URL QString url = http://www.gigacooldomainname.com/" + setName + "/" + fileName + ".jpg" where setName and fileName are QString variables. I wish to have the following: QString url = http://www.gigacooldomainname.com/" + QUrlParameter::encode(setName) + "/" + QUrlParameter::encode(fileName) + ".jpg" Unfortuna...

Is there QPath::Combine in QT4?

I need a similar to .NET method for safely combining path parts without worrying for platform specifics of the path separator. Is there such class and method in QT4? Something like: QPath::Combine ...

Scroll QTextBrowser to the top

I have the following: QString html = ui->DetailsTextBrowser->document()->toHtml(); html = details.replace("#VERSION", "1.0"); ui->DetailsTextBrowser->document()->setHtml(details); Unfortunately after the HTML content of the DetailsTextBrowser is set the document is scrolled to the bottom. I tried without success: ui->DetailsTextBrow...

Using QGraphicsScene subclass with ui?

I have implemented signals for mousePressEvent() in a QGraphicsScene subclass, but I can't figure out how to use the class in a UI. I can add a QGraphicsView widget to my UI, but how do I then access the scene? GraphicsScene *scene = new QGraphicsScene(this); // Add pixmap, etc ui->graphicsView->setScene(scene); // Here's where I'm stuc...

QGraphicsScene subclass is ignoring mouse press events

I have a UI and a QGraphicsScene subclass GraphicsScene that implements mousePressEvent(), however mouse clicks are being ignored. ui->setupUi(this); scene = new GraphicsScene(this); scene->addPixmap(QPixmap::fromImage(someImage)); ui->graphicsView->setScene(scene); connect(scene, SIGNAL(clicked(QPoint)), this, SLOT(someSlot(QPoint))); ...