qt4.6

Error building QtDeclarative with Qt 4.6.2 on Mac OS X

I tried hard to build QtDeclarative with Qt 4.6.2 on Mac OS X (Leopard) and did lots of Googling without finding any cure. Could anyone please help to solve this problem? Thanks. Here goes the error: Undefined symbols: "QObjectPrivate::isSignalConnected(int) const", referenced from: QmlGraphicsKeysAttachedPrivate::isConnected(ch...

Hook key & key combinations from keyboard with Qt 4.6

Let's say I have a window-less application which has only an icon on the Taskbar (Windows, Mac OS X & Linux). I want it to capture some key & key combinations, let's say Right Control + Right Shift. Upon keying in correct, combination, it will do something, say take screenshot. I can do window-less app, icon on the Taskbar and screen cap...

PyQt4: My database displays empty cells

Hello everyone. I am using the pyqt4 framework to do some displays for database forms. Unfortunately, I hit a snag while trying to filter and display my database by last name. Assume that the database connection works. Also assume that I have the correct amount of items in my tupleHeader since I use the same initializeModel method fo...

Qt: Animating the 'roll down' of a QWidget

I have a QWidget that contains various other widgets. I want to animate it appearing on the screen by gradually revealing it from the top down, increasing it's height from 0 to whatever it's natural height would be. The way I have it currently is: mAnimation = new QPropertyAnimation(this, "maximumHeight"); mAnimation->setStartValue(0)...

QT QFileDialog how to hide hidden/backup folders (".folder")

Basically when browsing folders inside a QFileDialog I find very annoying to have everything bloated with hidden or backup folders (don't know how to call them really); specially on home. Is there a way to prevent these type of folders from showing by default on a QFileDialog? I'm using Qt4.6 and getOpenFileName. P.D.: I'm starting to...

Error 404 when trying to fetch the Google Buzz @consumption feed

I'm writing an Qt application and I go through authorization process and everything. I'm even able to fetch the @self feed, but for some reason I get error 404 when trying to do the same thing with @consumption: "Download of https://www.googleapis.com/buzz/v1/activities/v.kiril/@consumption failed: Error downloading https://www.googleap...

Where to put app's code on a QT app?

I'm starting with QT4, I'm wondering where to put my application code. Here? void MainWindow::changeEvent(QEvent *e) {...} Or here? (where exactly?)int main(int argc, char *argv[]) { QApplication a(argc, argv); MainWindow w; w.show(); return a.exec(); } If I want my app not only react to user events, but to execute reg...

How to produce Capital hexadecimal digits with QString::arg() ? [QT]

Hi, I'm trying to create a QString which is a hexadecimal number with its letter digits in Capitals instead of small caps, how can it be done? QString( " %1" ).arg( 15, 1, 16 ) yields f and I'd like F ...

Reduce a table view's cell padding or margin

I'm using a Table View. I'd like to remove the cell padding (or margin) so I can squeeze more cells in less space. How can this be achieved? The cells size is set to 32 pixels on QT designer, if I set it smaller, the cells contents don't show and an ellipsis appears. (...) ...

How to use OpenGL functions on a QT OpenGL Widget?

I'm starting off QT 4.6's example "OpenGL - 2D painting" It uses a subclass of QGLWidget, and makes painting operations with the class QPainter. I'd like to know how to do drawing directly with OpenGL functions on the OpenGL Widget. ...

Need help with configuration of codeblocks for Qt !

codeblocks 8.02. , win xp SP2 , Qt 4.6 After installing Qt SDK, I installed QtWorkbench (codeblocks plugin that allows you to create Qt applications.) http://code.google.com/p/qtworkbench/. I worked under instructions from that page. I opened the folder "dialogs" and in it I opened a new empty codeblocks project. Also in this folder "d...

[qt] transparent window stays on top

Hello. I'm trying to make a transparent window stays on top (z-order). I want to implement something like layer that indicates some parameters on the other program. So what I need is to make background transparent, not whole widget with QWidget::setWindowOpacity function. I found some documents about it http://doc.trolltech.com/qq/...

How to overwrite the "next" slot in a QWizard ??

Hi: I'm using a QWizard class, which contains several QWizardPage. For some pages, I need to do something when "Next" button is clicked. I tried to overwrite the "next" slot in QWizard class, however, it seems this doesn't work. the program still went into the original "next" slot in QWizard class instead the one I implemented. Does th...

Customize the buttons in a QWIzard??

QWizard have some options related to the buttons as follows: NoDefaultButton NoBackButtonOnStartPage NoBackButtonOnLastPage DisabledBackButtonOnLastPage HaveNextButtonOnLastPage HaveFinishButtonOnEarlyPages NoCancelButton CancelButtonOnLeft HaveHelpButton HelpButtonOnRight Now these options are ...

how to drag and drop from another widget on to a QGraphicsScene

I need to drag from a QListWidget or something similar and drop on a QGraphicsScene, and create a subclass of QGraphicsItem at the drop location. Anyone have any ideas? I'm using Qt 4.6.3. ...

Where to control the QWizard button?

Hi: I'm using Qt, and I use a QWizard object which contains several pages. when it comes to a specific page, I want to hide the "Next" button first, and shows it after the user do something (such as clicking on a radiobutton...) I want to do some customize control of the wizard when this specific page shows up. the question is, I know ...

how to center a Qt mainform on the screen?

I've tried these in my mainform's constructor: QRect desktopRect = QApplication::desktop()->availableGeometry(this); move(desktopRect.center() - frameGeometry().center()); QRect desktopRect = QApplication::desktop()->availableGeometry(this); move(desktopRect.center() - rect().center()); but both put the bottom right corner of the for...

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...

how to print a QGraphicsScene that has text and graphics

I have a QGraphicsScene that has graphics as well as text drawn on it. When I try to print, the graphics are fine, but the text is using a font size defined in points, so scene->render() when I pass it a QPainter initialized with a QPrinter, has VERY large text. How am I supposed to print a QGraphicsScene that has text on it? edit: H...

How to trigger the edit mode of an item in a QTableView?

I'm using QTableView and QStandardItemModel now. In the QTableView, if you double-click a cell, this cell will get into edit mode and you can edit its content. Now I have a problem, I want to trigger the edit mode of an item by code (by command), what should I do? I cannot find proper function or slot in QTableView or QStandardItemMode...