qt

Segmentation fault in Qt Designer 4.6 with custom widget

Hi, I had a segmentation fault when using my new Qt Widget with Qt Designer 4.6. The problem arise when trying to preview the new widget. when using gdb I found that the problem is in qdesigner_internal::WidgetFactory::applyStyleToTopLevel: Program received signal SIGSEGV, Segmentation fault. qdesigner_internal::WidgetFactory::apply...

How to convert a regular win32 (VC++ vcproj) project to a Qt project?

How can I convert existing vcproj files to project files that the QT add-in to Visual Studio recognizes and treats as valid Qt projects? Should I just bite the bullet and create new projects to replace the old ones, and then add existing code? I am using QT 4.6 and VS 2008 with Qt Add-in 1.1.2. Original vcproj files have NOT been gene...

QRadioButton and QVBoxLayOut

Hi all, I used next code to dynamically create a group of radio buttons: self.wPaymantType.qgbSomeSelectionGroup = QtGuig.QGroupBox() vbox = QtGui.QVBoxLayout() for row in listOfChoices: radio = QtGui.QRadioButton(row) if bIsFirst: radio.setChecked(True) bIsFirst = False if len(row.name) > nMaxLen: ...

QUrl does not parse host name with underscore

Hi, Today I found that in Qt 4.6, QUrl would not parse a url if the host name contains the underscore. I understand that according to the standard, underscore is not allowed in the domain name, however, there ARE some urls with underscores, especially for some subdomain. For example, i came across this feed's url: http://hero_hki.mys...

Do I have to delete it? [Qt]

Hi, Do I have to delete objects from the heap in the example below? And if yes, how? #include <QApplication> #include <QTreeView> #include <QListView> #include <QTableView> #include <QSplitter> int main(int argc, char* argv[]) { QApplication app(argc,argv); QTreeView* tree = new QTreeView; QListView* list = new QListView; ...

Use Boost.Signal instead of Qt's signals? Do without moc?

I know they can be used together, but I'm wondering whether it's possible to replace Qt's signals and slots mechanism with Boost.Signal in the Qt parts of the program (widgets and such). Anyone ever try it? Any gotchas? Assuming I don't use any other MOC features and replace signals/slots with boost.signal, is it possible to do without...

Simplest build of QMYSQL3

What is simplest way to build the QMYSQL3 driver with the full 4.6 SDK (2009.05) installed? Does the resulting DLL require a manual copy in order for the SDK to use it? ...

Code/Function/Library to intent/format/prettify JavaScript/QtScript code for readablity within the application?

Greetings, in one of my applications I provide a simple code editor based on a QTextEdit widget and the QSyntaxHighlighter. I was wondering if there is function, library or generally a way to allow the user to have his/her code re-formatted and intented within the application? Websites like this allow you to re-format and intent JavaSc...

Qt + VTK + Cmake

I'm running OSX 10.6 (Snow Leopard), Qt 4.6, VTK 5.4, and Cmake 2.8. I installed Qt, then VTK and Cmake. I configured VTK to use QT 4.6 (turned on VTK_USE_GUISUPPORT and VTK_USE_QVTK). The configuration and installation worked painlessly but if I run Cmake with Qt references the compilation fails during the subsequent make process becaus...

setRawHeader doesn't follow elements in the web view

Hi, I want to test the rendering of a configured vhost before the hostname is set. Exemple : view the webpage "otherNameOfMySite" located at mysite.com if the dns entry "otherNameOfMySite" doesn't exist (but the apache vhost is set). My code : webvhost = new QWebView(); QNetworkRequest * request = new QNetworkRequest(QUrl("http://mys...

Barcode generation in Qt4

Hi. Any ideas for barcode generation into a textbox in c++ under Qt4? The idea is to have it in some kind of text format to save it and be able to read it later on. What about generating the image for printing? Thanks in advance. ...

qfiledialog - Filtering Folders???

Hi all, 1)I want to get the name of the folder for a folder monitoring Application.. Is there a way that i can filter out specific folders from being displayed using QFileDialog (For example i don't want the my documents to be displayed in the file dialog).. 2)I don't want the user to select a drive. By default in this code drives can...

Why is QMutex unknown?

I've included the QMutex header and using it as seen below. But I get the following error: error C2146: syntax error : missing > ';' before identifier > '_RecorderParamsMutex' error C4430: missing type specifier - int assumed. > Note: C++ does not support default-int error C4430: missing type specifier -> int assumed. ...

QPainter fails when calling begin

Hi, I'm trying to paint a PNG file on a QsplashScreen. Im' trying to do it via QPaitner. The reason I want to do it via QPainter is because I want it to minimize smoothly (until it disappear), When I'm just repaiting it it doesn't looks smooth at all. I passed the QSplashScreen to the QPainter constructor. When I call begin() in the QPa...

Whats the best way to send QStrings in a function call?

I would like to know what is the most efficient and practical way of sending a Qstring as a parameter to a function, in QT more specifically. I want to use a reference. The problem is I also want to instantiate that string in the function itself like so for example: this is the function prototype: void myFunction(QString & theMsg); th...

How to install a Qt application on a customers system?

I've got a Qt app that I need installed on a customers computer, which I can't assume has Qt installed on it. I'm on a Mac OSX and the computer I will be installing it on some Unix based system. I will be installing it myself so I don't need a GUI installation wizard or anything like that. Ideally I'd like to end up with a script or mak...

QtScript: crash on 64-bit windows.

I have compiled Qt for 64-bit architecture under windows and all works fine except QtScript. The following simple code, working perfectly with 32-bit Qt for windows installed from qtsoftware.com, crashes if compiled with 64-bit Qt . Maybe it's an error in my code? Or Qt is not compatible with 64-bit? Or something else? Any comments are w...

How can I implement a blocking process in a single slot without freezing the GUI?

Let's say I have an event and the corresponding function is called. This function interacts with the outside world and so can sometimes have long delays. If the function waits or hangs then my UI will freeze and this is not desirable. On the other hand, having to break up my function into many parts and re-emitting signals is long and...

Why have QString in struct sometimes a bad-ptr?

Hi there! I've got an complicated error. The software send PrintParamters to a Printer a couple of times. At a certain moment all QStrings of the Parameter Struct are broken (bad ptr) Is there an general issue with QStrings in Structs? here is the struct I'm using: typedef struct RecorderPrintParam { ES_DataType xxxxxxxxxx; bool ...

Debugging asserts in Qt Creator

When I hit a normal assert statement while debugging with Visual Studio I get the option to break into the debugger so I can see the entire stack trace and the local variables, not just the assert message. Is it possible to do this with Qt Creator+mingw32 and Q_ASSERT/Q_ASSERT_X? ...