qt

How can I call Objective-C code (specifically code from Mac system libraries) from C++/Qt?

Also, what is the difference between a .m and a .mm file? Or is that just some convention that Nokia uses for Qt? ...

Qt script get text property

Hi all, I'm trying to access the text of a QLabel using Qt script. Here is what I have: var mystring; var mylabel = objectFromPath("...someWindow::Label"); mystring = mylabel.text; // then do something with mystring This doesn't work and I don't know what I'm doing wrong. However, it doesn't give me an error. mystring = mylabel.t...

How QRectF::adjusted() works

My custom graphics item has (0,-60 60x60) boundingRect. When I adjust the coordinates with rect.adjusted(-5,-5,5,5) new boundingRect returns (-5,-65,70x70). I read the documentation here and I think boundingRect should return (-5,-65,65x65) Do I misunderstand the doc? ...

Mac OS X linker error in Qt; CoreGraphics & CGWindowListCreate

Here is my .mm file #include "windowmanagerutils.h" #ifdef Q_OS_MAC #import </System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGWindow.h> QRect WindowManagerUtils::getWindowRect(WId windowId) { CFArrayRef windows = CGWindowListCreate(kCGWindowListOptionOnScreenOnly, kCGNullWindowID...

Use an LLVM compiled version of Qt

I've seen some mkspec for mac or linux using llvm. Does anyone use an llvm compiled version of Qt ? Or llvm on their Qt Projects ? does it speed up compilation times ? Is your project faster ? ...

Fact or fiction: Webkit’s rendering performance is much lower when used in Qt

Using Qt’s Webkit implementation renders much slower than directly implementing the Webkit engine -- is this true or just a myth? From my own experience, I found the load time of a complex page about twice as long in Qt’s “Fancy Browser” example as it does in Google Chrome (which also incorporates a port of Webkit), but I hardly think...

Cannot press QPushButton in a simple program

Basically, I want a simple pushButton with a colorful text which when pressed exits the application. Why cant I press PushButton in this simple program. I am using QT 4.6 on Arch x86_64. #include <QtGui/QApplication> #include <QLabel> #include <QPushButton> #include<QtGui> int main(int argc, char *argv[]) { QApplication a(argc, a...

Should the name of my classes begin with 'Q' in Qt?

Hello Everyone, When I first started working with Qt, it was extremely annoying that every class has a name beginning with 'Q', but now I've got used to it. I'm using Qt Creator, and it highlights code quite well. However, it only highlights class names beginning with 'Q'. And it highlights everything beginning with 'Q' even if there i...

How to compile a Windows binary in Ubuntu?

I have a Qt application that I can compile in Ubuntu 10.04 64-bit and on Windows. However, I would like to avoid switching to Windows every time I want to compile the Windows version. Is there a way I can compile a Windows Qt executable in Ubuntu with mingw32 or something? Further, is there a way to integrate that compiler into Qt Crea...

dumpbin equivalent in Qt

Is there any utility similar to dumpbin(Visual Studio) in Qt that allows me to check the functions that are exposed in a Qt-Creator compiled dll ?? I need to know what methods are exposed in a given dll so that I can load the method dynamically at runtime using QLibrary. Thanks, De Costo ...

Qt: How can I receive events fired by QWebElement objects?

I want to receive notifications whenever links are clicked or text fields are changed in a Webkit instance in Qt. How can I hook up event listeners to a QWebElement? I know I can put some Javascript on each element’s onchange / onclick handler, but I’m looking for a cleaner solution. ...

adding padding to the stylesheet of a QPushbutton disable animation

When I add padding in a QPushButton's stylesheet the animation doesnt occur during button press,release: QPushButton{ border: 1px solid green; padding: 2px; border-radius: 4px; } By that, I mean the button text does not sink in. Is this normal? ...

Qt: How can I access the actual widgets on a page in WebKit?

Is there a way to access the widgets generated by INPUT and SELECT on a page in WebKit, using Qt? On a related note, does WebKit provide these widgets, or does it delegate back to Qt to generate them? ...

Quartz Window Services equivalent for Windows and X11?

What is the equivalent of Quartz Window Services for Windows and X11? I want to be able to capture individual windows with their decorations, shadows, etc., completely independent from each other. Basically what the Son of Grab example is able to do. http://developer.apple.com/mac/library/samplecode/SonOfGrab/Introduction/Intro.html Als...

Can I draw Qt objects directly to Win32 DC (Device Context)?

I can draw Qt objects to an QImage and then draw the image to HDC or CDC. This may hurt our application's performance. It would be great if I can draw Qt objects directly to Win32 HDC or MFC CDC. I expect that there is a class, say QWin32Image for clear, then I can use it in this way: QWin32Image image(hdc, 100, 100, Format_ARGB32_Premu...

How can I load scripts, styles and images from a non-URL source?

I am integrating WebKit (via Qt) into an application. Instead of having WebKit retrieve scripts, CSS files and images via URLs, I want my application to provide them (e.g. retrieved from a database). For example, a "regular" web page may contain this tag: <IMG src="photos/album1/123456.jpg"> Instead of WebKit fetching this image fr...

Using MAC STYLE with Qt

How do I apply the "mac style" on my forms and windows? Using Qt (C + +) ...

WYSIWYG with Qt - font size woes

I am creating a custom Qt widget that mimics an A4 printed page and am having problems getting fonts to render at the correct size. My widget uses QPainter::setViewport and QPainter::setWindow to mimic the A4 page, using units of 10ths of a millimetre which enables me to draw easily. However, attempting to create a font at a specific ...

Segmentation fault in Qt application framework

this generates a segmentation fault becuase of "QColor colorMap[9]";. If I remove colorMap the segmentation fault goes away. If I put it back. It comes back. If I do a clean all then build all, it goes away. If I increase its arraysize it comes back. On the other hand if I reduce it it doesnt come back. I tired adding this array to ...

how to convert from timestamp to data in QT ?

hello all i have unix timestamp and i need to convert it to Human readable data + time how can it be done in QT ? ...