qt

HowTo get work Microsoft Visual Studio 2010 and Qt Visual Studio Add-in?

Greetings everyone! Question: does any one have a success with combining Microsoft Visual Studio 2010 with Qt Visual Studio Add-in? I have tried to use MSVS2010 with Qt VS Add-in 1.1.5, but no luck. PS: no never mind what exactly arch or OS, I used Win7 x32... Thanks! ...

What is the best way to present a list of images in Qt?

I want to load a number of images into a widget that will show me the images in a list. It can be many images so it needs to be fast, also I'd like to attach a check box for each image presented. What will be the best way to implement it in Qt 4.6? ...

qtmessaging: no such file or directory (Qt-Mobility)

I had a problem while I'm compiling the existing example in Qt-mobility. It's a code example shows how to use messaging API in Qt for symbian. After run the program there was an error occured: Cannot open include file : 'qtmessaging.h': no such file or directory So what to do for use the qtmessaging library? Thanks in advance. ...

What is the proper name for a multibutton?

Hello, I'm trying to design a UI in Qt and I can't find anywhere in the designer a button which can be "droped down" like combobox. What I mean by that is that I would like to have this button with his "default" option choosen so if I like it I would have to just click on it but if I would like to choose different option I would be able ...

Rotation about a given point

I have a point, let's say p(0.0, 0.0, 20.0) which I want to rotate about point a(0.0, 0.0, 10.0) in XZ plane. What is the simplest way to do it? I am using Qt with QVector3D and QMatrix4x4 to perform transformations. Everything I can think of is something like that: QVector3D p(0.0, 0.0, 20.0); QVector3D a(0.0, 0.0, 10.0); QMatrix4x4 m...

Shared data location for Linux and Mac OS X

On Windows, there is a standard location for application data that is shared in common with all users on the machine (i.e. in Vista/7, (root):\ProgramData). I'm looking for a way to get such a folder on other platforms using Qt. Does Qt provide a built-in method for doing this? (QDesktopServices looked promising, but does not seem to p...

QGlWidget fullscreen no menu

I have an app that is a single QGlwidget with a right-click QMenu created when needed. The data is drawn in an overridden paintEvent() But in fullscreen mode the menu isn't displayed. Am I better having a QGraphicsScene as the parent window and a QGlWidget as the sole child? ...

QFile open file for writing fails

I'm trying to open file and write some text data into it. QFile out(":/test.txt"); if (!out.open(QIODevice::ReadWrite)) { QMessageBox msgBox; msgBox.setText(out.errorString()); msgBox.exec(); return; } But it fails with "Unknown error". (Qt 4.6, Wnidows XP SP3) ...

QGraphicsView noobie question

Trying to add text to QGraphicsView: Widget::Widget(QWidget *parent) : QWidget(parent), ui(new Ui::Widget) { ui->setupUi(this); QGraphicsScene scene; scene.addText("Hello, world!"); ui->graphicsView->setScene(&scene); } But when the project running, there is nothing on the QGraphicsView. ...

Help with audio visualizer

Hi all, Im new to this website, and mostly to any type of programming. Recently Im trying to learn C++(Game Programming), and my father wants me to make him a web-based application, that flashes the window wether there is any sound playing(I believe it's called an audio visualization), I talked to my brother, and he said that I should do...

Php script that responds to my qt application

Dear PHP and Qt experts, I want to create a Qt application that takes a random integer and sends to the server to a specific file (say to process.php) in order to that file to answer to that Qt application if the number is odd or even. And when the Qt application gets the answer from the process.php, it gives a message box that tells th...

How to get a QModelIndex of a row, found by a SELECT-query (QSqlQuery) without modifying the original QSqlQueryModel

Hello, I already asked the question but I was misunderstood, so I try to precicise the problem. I am using a QSqlQueryModel for showing data from a SQLite Database, for the view I use a QTableView. Now I want to implement a "Search/Find/Replace" dialog, so I search the database with an additionally created QSqlQuery and let's say I fi...

Finding programming challenge for a (probably) Qt project with tight time frame (interview level)

Dear stackoverflow: What would you suggest would be a good challenge for a programmer to show us her/his skills? I'm thinking of a small demo implementation of a GUI program which would not take too much time to do. Here are the circumstances: (this should not imply the intention to find programmers here, I think there'd be other forums...

Duplicates in QSet

For a class X and a QSet< X* >, how is it possible to make sure that the QSet doesn't contain duplicate elements? The unique property in each object of type X is a QString that can be fetched using getName(). I've implemented the qHash(X*) function, the operator==(), operator<() and operator>(), but the QSet still accepts duplicate elem...

Qt - accessing the bundle path

The Qt documentation "Mac Differences" page provides the following code for accessing an application's bundle path: CFURLRef appUrlRef = CFBundleCopyBundleURL(CFBundleGetMainBundle()); CFStringRef macPath = CFURLCopyFileSystemPath(appUrlRef, kCFURLPOSIXPathStyle); const char *pathPtr = CFStringGetCStringPtr(macPath,CFStringGetSystemEnco...

How to "Reveal in Finder" or "Show in Explorer" with Qt

Is it possible to open a folder in Windows Explorer/OS X Finder and then select/highlight one file in that folder, and do it in a cross platform way? Right now, I do something like QDesktopServices::openUrl( QUrl::fromLocalFile( path ) ); where path is a full path to folder I want to open. Obviously, this will just open the folder, an...

QT/WebKit GUI pass selected HTML element data to Qt app

Hello, I'm going to collecect form inputs on web pages to fill them next time automatically based on input field name. How to pass selected/howered HTML element data in QtWebkit to qt application? Like Firebug does. Qt version: 4.6 / 4.7 Thanks. ...

mysql qt in linux and windows

On a centos, qt creator 1.2.1 qtsdk-2009.04 what step by step is needed to create mysql driver, in linux and in windows. such that running following command gives an positive output QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL"); db.setHostName("xxxxxxxxxx"); db.setDatabaseName("xxxxxxxdb"); db.setUserName("xxxxxxxxxxx"); db.se...

Clean up QThread after calling quit()

I have a problem. If I call Abort(), run function will return without complexMath instance have enough time to do clean up. What i want is, after calling Abort(), complexMath instance have enough time to shutdown itself, clearing all pending signal and slot(inside complexMath, it also have it own signal and slots) before it return. vo...

[Qt]Customising QTreeWidgetItem

I want to customise QTreeWidgetItem. I wish to add to it, two Toolbuttons and a string. Also I wish to add these to only one column in the treewidget. I tried to subclass QTreeWidgetItem but realised I coult not "paint" on it as it is not derived from QWidget. I then tried using QTreeWidget::setItemWidget(QTreeWidgetItem *item, int co...