I made a simple test of your scenario, to make sure if it would require any non standard step:
AWidget, which inherits QWidget, is part of liba.
BWidget inherits from AWidget and is part of libb.
A dummy main.cpp where QApplication is initialized and a BWidget is created and shown.
The BWidget showed up on the screen normally, without any non expected action to build the whole thing.
So, check if there is a bug in your lib, even though the segmentation fault happens inside Qt, it can be triggered by a wrong line in your code. If you find a suspect, post a snipet here so we can help you.
I'm troubleshooting a similarly strange issue. QT seems uses the KDE native File Chooser when I include the svg, network, and dbus modules (QT += network dbus svg)
But if I remove ANY single one of those, it goes back to the QT File chooser. Its very bizarre that the svg module has any impact on that! I could see where network and dbus might have some affect, but svg?
This all seems horribly inconsistent and broken. Whether QT is to blame or KDE, the two need to get together and figure it out. This behavior occurs with the Kubuntu 10.04 LTS distribution and will be around for some time. Its definitely in QT's interest for KDE to continue to work properly since they are so integrated. Many people choose KDE/Kubuntu because of that fact.
There are only for a examples, no control, no efficent, is only for understand how can you set a simple query...
//Open mysqlite db @void sql::connect()
db = QSqlDatabase::addDatabase("QSQLITE");
ok = db.open();
qDebug() << db.lastError();
//Create a table and insert some value @void sql::test()
QString str = QString("CREATE TABLE t(x INTEGER, y, z, t,PRIMARY KEY(x ASC))");
str = QString("INSERT INTO t VALUES(10, 5, 7, 'test')");
//Simple get some values separate from a ; in a QStringList
@QStringList sql::getActionUser(qint32 iduser)
QString str = QString("SELECT A.id,A.name,A.data FROM Action AS A WHERE A.iduser= '%1' ORDER BY A.data DESC").arg(iduser);
you can do a whole bunch of stuff on images as others have already replied. you can apply effects, you can do custom painting on top of it, or you can run through individual pixels in the image and modify them how ever you want, see one example I just created in this "wiki page":http://developer.qt.nokia.com/wiki/Manipulate_image_and_apply_RGB_mask
my action here it's not visible because the widget overlapped it, so to became visible I was needed to do:
@QAction* fakeAction = new QAction( QString() ,menu );
/* add fake actions till the wanted action is visible*/
menu->addAction( fakeAction );
/* add the wanted action at the end*/
menu->addAction( action );@
I would like to have :
@action->setGeometry( 0,113,152,140 );
menu->addAction( action, indexPositionInMenu );//if we can't have different heights for more actions@
After thinking more about what I really want to do, I came to the conclusion that I do not want to pause listening anymore :-)
Reading the HTTP specification, I found out that the HTTP server shall never ignore or reject connections. In case of overload, it shall send a HTTP 503 response, which is pretty small and does not costs much resources.
OK, it appears that this is in some way related to running on OS X. I've been debugging through the source and found out that qwidget_mac.mm is clipping view frames to 16bit coords. In fact, these two defines at the top of the file map almost exactly to values I see my sizes being changed to:
I am currently writing a HTTP web server - just to learn it. It executes a QTcpServer in the main thread and processes incoming requests in 10 worker threads.
When a new connection comes in, I get the connection via QTcpServer::nextPendingConnection() which returns a QTcpSocket which is derived from QObject. Now after getting that QTcpSocket in the main thread, I need to pass it to one of the 10 worker threads. The easiest way would be to send them as a signal, but this does not work, als the documentation of QTcpServer specially highlights.
The documentation of QTcpServer also provides a solution: Passing the integer socket descriptor ID instead of a QSocket object. SO in this case, it was easy to workaround the limitation.
Wrapper binary sounds like busybox. Tons of symlinks on the single binary which looks at @argv@. Maybe this is a solution for you, but I would separate it into backend and GUI/CLI frontend as Denis suggested.
There is no need to avoid qobject_casts and there is no implementation error in Qt (at least not there;-). Since Qt can work without RTTI (runtime type information) it can not dynamic_cast and it is not necessary to do so as qobject_cast makes sure a reinterpret cast will work by checking the Qt meta object data.
Qt headers do trigger warnings when compiled with a high enough warning settings. So far all I looked into where false positives (like this one you report here). If you want to use high warning levels and still build using Qt then you might want to consider telling your compiler that the Qt is a system library (it will not generate warnings for those). With gcc this is e.g. done by using the -isystem /path/to/qt.
Ok, my fear was grounded: using DUMPCPP to wrap a COM object for use within your QAxServer will get you a buffer overrun. I just compiled the Qutlook example with an additional QAXFACTORY_DEFAULT in the main.cpp to convert it to a QAxServer app. Compiles but bugs out, just like my app. Also the QAxServerd.lib seems to prefer to be linked before QAxContainerd.lib (project settings) to avoid 'already defined' errors.
And I must agree (mostly) with lyuts, I don't like that there isn't at the very least, an ok button, because clicking that I know that the settings will take effect, rather than just hitting the close button. I would advise at least using an ok button so that users are more familiar with it. (if all else put a finish button as well as a close button :P even if the changes are applied dynamically)
Just as a note, I have yet to be able to build the library static either. Admittedly I haven't been able to do any real tests for it because the only windows computer I have is a laptop that takes about 3 hours just to run the configure, but I would love to see the answer for this, because it would let me get my application ported to windows as well.... Anyone know if an application built in wine is fully compatible with Windows? Because I know I can run Qt in Wine, but I haven't tried to build it static yet (mostly because the dependencies, I would think, are much harder to satisfy through Wine than they are through Windows)
alright i will. at least, i'll put the question about isolating an element in a QWebView in a different thread, the other one still only needs a yes or no answer, (any chance i could actually get an answer to them rather than arguing over weather or not it should go in a new thread? :P )