qt

Qt commercial licenses?

Does anyone know the details of the Qt commercial license? Cost? Hidden policy gotchas, single and multi platform etc? Forgive my laziness, however their website offers few details and I thought I would ask here about anyone's specific experiences prior to submitting to the sales pitch. Is the commercial vs open source installation dif...

Getting data from a QTreeWidgetItem inherited class

I have a class which inherits from QTreeWidgetItem and I intercept the click event. I need to get another object from inside MY QTreeWidgetItem when I click the tree row, how can I do that?? ...

qt/c++ casting question

I have a QVariant object within a QTreeWidgetItem, how can I cast it to my own object? ...

Identifier for win64 configuration in Qmake

Is there a "win64" identifier in Qmake project files? Qt Qmake advanced documentation does not mention other than unix / macx / win32. So far I've tried using: win32:message("using win32") win64:message("using win64") amd64:message("using amd64") The result is always "using win32". Must I use a separate project-file for x32 and x64 ...

QVariant and qRegisterMetaType question

I have a class Pkg and I need to use it under form of QVariant. At the end of my Pkg.h I have: Q_DECLARE_METATYPE(Pkg) and this does not give compile errors, but in my main.cpp I have to do: qRegisterMetaType<Pkg>("Pkg"); and this does not give errors too, but when I try to create a QVariant(Pkg) I get lots of errors like: In me...

Mixing Qt and Boost

I'm looking at starting a project in C++ using the Qt 4 framework (a cross-platform GUI is required). I've heard great things about the Boost libraries from friends and online. I've started reading up on both and wanted to ask a cursory question before I got too deep: Are these two development "systems" mutually exclusive? My initial...

How do I set the ideal QPixmapCache::cacheLimit?

I have just started using QPixmapCache and I was wondering, since there is not much documentation, about how to adjust the size based on the system the application is running on. Some users might have lots of free memory while others have very little. I have no idea what the best setting would be. What would be the best way to detec...

Is it possible to sort numbers in a QTreeWidget column??

I have a QTreeWidget with a column filled with some numbers, how can I sort them? If I use setSortingEnabled(true); I can sort correctly only strings, so my column is sorted: 1 10 100 2 20 200 but this is not the thing I want! Suggestions? ...

Need advice on Windows to OS X Port Estimation and cost of dev. on OS X

Hello, I am a 10year+, C++ linux/windows developer and I have been asked to estimate the effort to port the windows application to OS X. I haven't developed on OS X before,so I don't know what to expect. It is a C++/Qt application, so I want to ask: what are the de facto tools like editor, IDE, compiler, make tool, etc ? Which tools a...

Using Win32 API in Qt OSE project

It is a messy question, hopefully you can figure out what I want :) What is the best way to use Win32 functionality in a Qt Open Source Edition project? Currently I have included the necessary Windows SDK libraries and include directories to qmake project file by hand. It works fine on a small scale, but its inconvenient and cumbersome...

scrolling KTextEdit to start

I have a KTextEdit, filled with some text. When I put lots of text, the KTextEdit will be scrolled automatically to the end (obviously). My question is: how can I scroll to the start (viz to the first line of the KTextEdit) ?!? ...

How to remove QWidgets from QSplitter

In my app have a window splitted by a QSplitter, and I need to remove an widget. How can I do that? I can't find useful methods ...

Changing terminalinterface command after showing it on qt/kdelibs app

I have this terminal on my qt/kde application KLibFactory* factory = KLibLoader::self()->factory("libkonsolepart"); KParts::Part* p = static_cast<KParts::Part*> (factory->create(this,"terminal",QStringList() << "terminal")); assert(p); TerminalInterface* terminalInterface= qobject_cast<TerminalInterface*> (p); terminalInterface->showShe...

How to automatically sort a QTreeWidget column?

Hello, i'm using a QTreeWidget to display some simple items. I've set the list sortable by .setSortingEnabled(true) calling. In this way, the list is sorted only when the user press the title column, and not automatically whenever new item is inserted. I have two question: Is there a way to force the automatic sorting in a specified co...

(QT/kdelib) how to know the end of a command in KTerminalInterface?

I have a KTerminalInterface (from kparts) in my qt/kdelib app, and I run a command within it. The problem is: how can I know if the program is terminated? I need to know it because at its end I must reset some variable. Does anyone got a similar problem?!? ...

Minimum CompSci Knowledge Needed for Writing Desktop Apps

Having been a hobbyist programmer for 3 years (mainly Python and C) and never having written an application longer than 500 lines of code, I find myself faced with two choices : (1) Learn the essentials of data structures and algorithm design so I can become a l33t computer scientist. (2) Learn Qt, which would help me build projects I ...

Building Xcode Projects From the Command Line

I've been playing around with Qt for a few hours now. I found that qmake produces Xcode project files on Mac OS X instead of good ol' makefiles. I don't want to launch Xcode every time I want to build "Hello, world". How do I make qmake generate regular makefiles or, if that's something that cannot be done on the Mac, how do I compile ....

QX11EmbedContainer and QProcess problem...

Hello folks, I've been trying to put a QX11EmbedContainer in my app, and I need to start a terminal within it (because with konsolepart I can practically do nothing). QX11EmbedContainer* container = new QX11EmbedContainer(this); // with or without "this" I got the same result container->show(); QProcess process(container); QString exec...

install EventFilter on QWidget (qt4.4.3/kde4)

I have a K* window, and within it, a widget which needs the events filtered. For example I do not want the possibility of clicking it... How can I do that? Have I to use eventfilters? In this case, what's the best way? ...

Hand Coded GUI Versus Qt Designer GUI

I'm spending these holidays learning to write Qt applications. I was reading about Qt Designer just a few hours ago, which made me wonder : what do people writing real world applications in Qt use to design their GUIs? In fact, how do people design GUIs in general? I, for one, found that writing the code by hand was conceptually simpler...