qt

Get the name of application in focus (on Mac)

Hello All, I have a requirement where, I need to have the name of the running application in focus. I am using C++/Qt/Carbon. Any help is highly appreciated. Thanks, Rahul ...

Accessing the child UI elements in a Qt UI

I have defined a UI (let's call it myUI) using the Qt designer, and using it in my applications. I need to access all the sub-widgets (QToolButtons) in myUI. I want to get all the subwidgets as a QObjectList. Is there any way to do this? The QObject::children() doesn't work here because the Qt UI Compiler, when converting the .ui file...

How to deploy my application using Qt-Creator?

I'm trying to deploy my simple Qt project like a hello world. I build it successfully and can also execute it on Qt-Creator. However, I can't execute the binary directly in the release folder due to some shared library errors. So I just copy some essential librarys to the release folder such as qtcore.dll and qtgui.dll, but I can't st...

Generate .h and .cpp from .ui file

Hey guys, I have the file about.ui. As you know, inside the qt design i can do the ui.h file... But how can i make the "about.h" and the "about.cpp" from my .ui file? i have to create a .moc file too? How can i compile this after create to see if all be done correctly? Thanks from Brazil! :-) *I´m using qt 3.2 ...

What is a good way to load an application specific font on Qt on Symbian?

Is it possible to use QFontDatabase::addApplicationFont() in Symbian? It seems to return -1 (error) even if the file exists? If not, is there some alternative to this, apart from system-wide font installation? Thanks. ...

what can I use to replace sleep and usleep in my Qt app?

I'm importing a portion of existing code into my Qt app and noticed a sleep function in there. Now after doing some researching I read that this type of function has no place in event programming. What should I do instead? Also, I am aware of QThread::sleep() [static protected] and subclassing it but I heard thats a hack and ends up d...

Qt QMenu position

Hi, I would like to have a QMenu above a QToolButton, without rewritting a custom widget playing with relative/absolute size and positions (meaning without coding :)). Does anyone know if it is possible using styles or properties? I didn't see anything like in the documentation. Thanks, Boris ...

QFileDialog: adding extension automatically when saving file?

When using a QFileDialog to save a file and to specify the extension (like *.pdf) and the user types in a name without this extension, also the saved file hasn't this extension. Example-Code: QFileDialog fileDialog(this, "Choose file to save"); fileDialog.setNameFilter("PDF-Files (*.pdf)"); fileDialog.exec(); QFile pdfFile(fileDialog.se...

How to make item view render rich (html) text in Qt

Suppose my model has items with the following string for Qt::DisplayRole <span>blah-blah <b>some text</b> other blah</span> I want QTreeView (actually, any item view) to render it like a rich text. Instead, item views render it like a pure text by default. How to achieve the desired rendering? Actually, this is a search results mod...

QMenu* << QAction* -- Help Me Write A Global QMenu Insertion Operator

If for no other reason than for my own amusement, I wish to write a global insertion operator so I can use the fancy code: aQMenu << aQAction1 << aQAction2 << aQAction2 << seperator << aQAction3; Perhaps you hate the syntax, but I would at least like to try my hand at using it. The problem is, that this is the first time I have tried...

How to convert QWidget 's image format from ARGB32_PreMultiplied to ARGB32 ?

How to convert QWidget 's image format from ARGB32_PreMultiplied to ARGB32 ? ...

Qt4 QNetworkManager Hangs

I'm trying to write an application using QNetworkManager. I have simplified the code down to the problem. The following code hangs, and I have no idea why: main.cpp: #include <QApplication> #include "post.h" int main(int argc, char *argv[]) { QApplication app(argc, argv); post("http://google.com/search", "q=test"); return a...

Qt Webkit - AutoComplete an Input

Hi can someone help me find the documentation (im unsure what to look for) to be able withint Qt Webkit change the text inside a Input TextBox on a WebPage - i would like basically to make a feature so people could Remember their inputs on a webpage and save as a Preset.. once preset is clicked - auto fill in. ...

Using Qwt on Mac OS X

How can I compile and run Qt programs using Qwt on Mac OS X? I always get an error telling me that it can't find libqwt.dylib. For what I have understood from my googling it won't help to set DYLD_LIBRARY_PATH in environment.plist since Apple has disabled that due to security reasons so how am I supposed to do it (without manually copy...

Use Preferences menu item.

Hello, I am building an application on Mac in Qt. I am having problems in using preferences menu item already present there. If possible please provide some Sample code which will enable me to have the QAction on click of Preferences menu item. Any Help is appreciated. Thanks, Rahul ...

Qt signals and slots - are they intended for GUI only or for entire app architecture?

Hello. I'm very curious - are Qt's signals and slots (delegate patter?) intended only for GUI callback or they are perfectly fine and intended for entire app? I mean, is it better to split app into small, self-contained objects (classes) and interconnect them via signals and slots. And if so, what is the recommended way to return value ...

Can I use Qt as C++ Library without using its UI framework

Does it make sense to use Qt for increasing the productivity in an MFC app, without actually using the Qt user interface system? I am currently looking or a good productivity library for my MFC based application, with useful container classes, string algorithmus, threading classes, I/O classes and so on. The Qt API is very nice in my o...

PyQt Documentation

I have installed PyQt GPL v4.6.2 for Python v3.1 and Qt by Nokia v4.6.0 (OpenSource), but the documentation in PyQt is not coming up. Example docs are all blank too. Would anyone mind writing a step-by-step guide on what links to visit and what procedures must be executed in order to get text to come up for the PyQt Documentation? Edit...

Qt "connect" syntax is very long. Is it any tricks to make it shorter?

Hello. In C# in order to connect a signal to slot (delegate to method) all i do is: first.signal += second.slot But in Qt it is: connect( & first, SIGNAL( signal( int, int, QString ) ), & second, SLOT( slot( int, int, QSTring ) ) ); And this one is counted short, normally they are spawned 2-3 lines. Of course i fully understood th...

Is there an "easy" way to add customizable keyboard shortcuts to my Qt4 app?

Hi all, I've got a sizable Qt app that has been in development since the Qt 3 days, and it now contains dozens of windows with thousands of menu items, controls, and other user-initiatable actions. It currently compiles under Qt 4.6, for Linux, MacOS/X, and Windows. The new feature request from on high is that the user should be able t...