@Onikouzou What is this checkbox used for?
If you only want to use a combobox then do:
soundList << "Sound 1" << "Sound 2";
showSounds.setOptions(QInputDialog::UseListViewForComboBoxItems); // Remove this if you want a combobox instead of a list
Actually, my idea is to have a storage of different wooden blocks in user interface and drag them one-by-one to working area to design a house model and then generate a txt file containing the stream of the coordinates (including some other attributes like color, shape) of building blocks.
@Wieland, this float number is represent the speed Value of DC motor in RPM, may you mean I it should be in double type or something else!!.
in fact I don't know obviously whit's the type I should use this is the GUI I built link text
you can see in Stack-overflow here: link text
may you get what I need, I'am sory to be annoying but I spent alot of time in this problem :(
Ah ok, so it is due to the organization of C++ not Qt, and like you said, the difference of a class instances and pointers.
It has been long time since I've had to use C++ and I never did anything too advance with it other than a text-based adventure game. I generally am more focused on hardware oriented programing such as with C and Verilog, and MATLAB is the only more software (excluding Arduino interaction) oriented language I have decent experience with.
Thank you for pointing out why there needs to be a difference. I wasn't familar with pointer usage in C++.
The original post is some 2 months old. So I wrote a whole lot of a post in reply to the original question ... well didn't my ears burn, when I noticed the post time ... I felt like a complete idiot. :)
I'm not sure anyone cares about this anymore, but I believe I know what the problem is.
When the plugin class is created, it is actually created outside the currently executing QApplication (via dlopen) and the code is running in a different thread. By reading up a bit on dlopen, it seems that the memory where the library is created comes from a different pool and that all libraries (used like this at least), should make sure to implement a function to destroy themselves.
Not sure if this makes any sense for someone, but it does for me.
Now, I just need to figure a way to get the libraries thread to join with the man QApplication that is already running.
In my "QAbstractItemModel::index()" function. I didn't think the view widget would call "index()" with out of bound row/column combinations since it can use "QAbstractItemModel::rowCount()" and QAbstractItemModel::columnCount()" to get the structure of the model.
Thanks again for your help.
Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.