Just change this line:
Qt Code:
To copy to clipboard, switch view to plain text mode
to:
Qt Code:
To copy to clipboard, switch view to plain text mode
That aught to do it.
Just change this line:
Qt Code:
To copy to clipboard, switch view to plain text mode
to:
Qt Code:
To copy to clipboard, switch view to plain text mode
That aught to do it.
unfortunatly that did'nt do it. the properties for QFrame and QabstractScrollarea and more are still not visible in designer. I will attach two screenshots to better explain the situation. in the customwidget screenshot i have added a custom widget and marked it for editing so that u can see the properties available for editing in the property editor.In the qtwidget screenshot i have done the same but with a ordinary QListWidget.
confused.......
You're not calling the base class (QListWidget) constructor.Qt Code:
To copy to clipboard, switch view to plain text mode
Should be:
Qt Code:
To copy to clipboard, switch view to plain text mode
I changed the dateListView.cpp to the following...BUT i am still not able to edit all the propertys of a QListWidget in Designer.
Qt Code:
{ }To copy to clipboard, switch view to plain text mode
So i am wondering is this part right in the customwidgetplugin.cpp
Or should it beQt Code:
};To copy to clipboard, switch view to plain text mode
Or evenQt Code:
To copy to clipboard, switch view to plain text mode
Qt Code:
To copy to clipboard, switch view to plain text mode
or is this all to do with the propertyEditor?
QDesignerFormEditorInterface :: propertyEditor ()
Is this what i somehow have to incorporate in my plugin?
It should be
Qt Code:
To copy to clipboard, switch view to plain text mode
I suggest you take a look at an example of making a Qt Designer plugin that comes with Qt docs.
Oh! i have read them time and time again!
The plugin is showing in designer so in that way i have done exactly as far as the example in the documentation takes me. But i have read numerous post, (on this FORUM and others. Here is onehttp://www.qtforum.org/thread.php?th...ght=Q+PROPERTY), that is asking exactly what i am asking. The problem is that none of the posts have any replies in them.
So i am starting to think it is not possible.
I think that it is only possible to edit the properties of the base class QWidget even though the documentation vaguely suggests that it is supposed to be possible to make the properties editable in designer by declaring Q_PROPERTY() in the class declaration.
SO if someone can prove me wrong i will jump with joy.
Last edited by Sisyfos; 13th December 2006 at 22:40.
check this one out for instance http://www.qtforum.org/thread.php?th...ght=Q+PROPERTY
It's not exactly what you are asking. The poster there can't add any properties, and you can't see the ones which are already there.
I assure you it's possible.So i am starting to think it is not possible.
Of course it's possible to add new properties and to see existing ones.I think that it is only possible to edit the properties of the base class QWidget even though the documentation vaguely suggests that it is supposed to be possible to make the properties editable in designer by declaring Q_PROPERTY() in the class declaration.
SO if someone can prove me wrong i will jump with joy.
Here you go, you may base your widget on the code attached.
Last edited by wysota; 13th December 2006 at 23:18. Reason: Added the example code
Sisyfos (14th December 2006)
I have not yet had the time to analyse exactly what i did wrong. I will have to look at that in the morning when my brain has regained capacity enough to grasp what u have done. BUT i just wanted to thank u so VERY much for taking the time to look at my sad example and point me in the right direction. I have tried for two days now to figure out what u did in a couple of minutes. So it is really a load of my shoulders. Again THX!
That's not my first Qt Designer plugin, I also learned on my mistakes while making my first plugins.
I sort of figured it was not your first plugin![]()
There were a number of problems with my code but most of all i had not understod the part where u call the base class constructor which seems to have caused some problems. But on thing i am wondering about is it really necessary to include the QCoreApplication. Cause it seems as if it was needed in my program but it is not clear from the documentation that it is needed in cases like this.
BUT then again i dont find the documentation to be very good it leaves a lot of guessing to be done.
Anyway i changed my code according to your example that u attached and now everything works just fine and i am happy as a clam.
I recommend all ppl that are having any problems with their plugins to take a look at the code that Wysota has attached. It is a good base to stand on.
Bookmarks