View Full Version : wwWidgets
wysota
21st April 2007, 21:13
Beta release of wwWidgets4 - a set of widgets for Qt4 has been released
Download package (http://www.wysota.eu.org/wwwidgets/download/wwwidgets0.5.0b.tar.gz)
The set consists of the following widgets:
QwwColorButton Button acting as a colour chooser
QwwColorComboBox Combobox that allows to pick colors. (unstable)
QwwHueSatPicker A widget allowing color picking in a form of a hue-saturation rectangle
QwwHueSatRadialPicker A widget allowing color picking in a form of hue-saturation circle
QwwLineEdit QLineEdit with regular expression validation support
QwwListWidget An enhanced QListWidget
QwwLongSpinBox A spinbox taking long long values
QwwNavigationBar Widget simmilar to MS Outlook navigation bar. (unstable)
QwwNumPad A numeric keypad widget
QwwTaskPanel Task panel simmilar to the one from WindowsXP.(unstable)
QwwTipWidget Widget that displays application tips
QwwTwoColorIndicator A widget allowing to choose a foreground and background colour
Widgets marked as unstable are hardly or even not at all usable. The color combobox has beed disabled and will not be built, so you won't see it in your widget box.
To build and install the set issue qmake, (n)make and (n)make install commands. The set should install cleanly on Unix and MSVC installations. There is a little problem with MinGW - you have to copy the .a file to the appropriate directory yourself.
To use the set simply add "CONFIG += wwWidgets" to your project file.
The set is not completed, but I decided to release it now anyway (GPL licence), because I don't know when I'll be able to finish the set so in the meantime it may be of benefit to someone. If you want to use any of the widgets in a commercial product, please contact me.
Comments about the release are welcome and appreciated - you can send me a private message, just please don't send reports about obviously not completed functionality. Please don't send reports about unstable widgets.
Due to a lack of functionality in Qt (at least up to versions 4.3beta1) Designer made custom container classes (such as the navigation bar and the task panel) will not work (hand coded classes should work fine).
high_flyer
23rd April 2007, 08:39
Hehe, looking at the list it looks to me, you collected all reoccuring (in the forum) widgeds that users try to make, or look for.
Kind'a "see a need, feel a need" :D
Not bad, I will have a look at it as soon as I can.
Cheers!
pdolbey
26th April 2007, 19:47
Hi wysota
To get my VS2005 SP1 to compile/link this correctly, I needed to change qwwtwocolorindicator.h from
.
.
class QwwTwoColorIndicatorPrivate;
class Q_GUI_EXPORT QwwTwoColorIndicator : public QWidget, QwwPrivatable
{
Q_OBJECT
.
.
to
.
.
class QwwTwoColorIndicatorPrivate;
class Q_WW_EXPORT QwwTwoColorIndicator : public QWidget, QwwPrivatable
{
Q_OBJECT
.
.
This looked right compared to other classes in the distro.
Other things causing minor problems
The nmake install installs the dll into the QTDIR/lib folder, not the bin folder - yet another PATH entry required then?There's no "d" suffix to discriminate between debug and release build as suggested in the help pages. (I tend to use bin/bind folders as a model for my app builds but this is supposed to act a standard Qt extension)The "plugin" is being built with a staticlib setting in the pro file - I'm not sure if this is what you intended.
Still trying to get it working - I'm after one of those marvellous "Outlook 2003" navigation bars (and I saw some of the flame wars on the "other" Qt forum). However I've already sorted out the styling of QPushButtons - just trying to get the behaviours the same. Current screen shot attached.
Pete
wysota
26th April 2007, 20:03
Oh, yes... sorry about that... I thought I corrected that. I'll update the archive right away.
sunil.thaha
28th April 2007, 14:00
Thank you for a Great collection of widgets ...
These widgets help us to have a better understand of the Qt Sources. Your pimpl implementation rocks :-) . I liked the way you used a Base class to handle the destruction of d_ptr. Is that an implementation of RAII Idiom ?
One Question,
I found that you have used some undocumented features like the Q_Q and Q_D macros ... and trolltech warns us against the use of these macros. So is it fine to use it or should you create your own Q_WW_D ?
wysota
28th April 2007, 16:19
Is that an implementation of RAII Idiom ?
I don't have the slightest idea. If it is, then it's unintentional :)
[quote]I found that you have used some undocumented features like the Q_Q and Q_D macros ... and trolltech warns us against the use of these macros. So is it fine to use it or should you create your own Q_WW_D ?
It depends. I use it on my own pointers so it's safe. But you shouldn't use it on pointers Qt provides - I tried :)
sunil.thaha
30th April 2007, 16:14
Since we are expecting the our private data to be derived from QwwPrivate. Why do the functions like d_func() use reinterpret_cast rather than a dynamic_cast ?
pdolbey
1st May 2007, 10:49
wysota,
I know you said not to to comment about "unstable" widgets, but I had some minor success yesterday hacking the qwwnavigationbar component into some sort of stability. I've got the primary functionality working with the PushButtons activating the correct QWidget in the top half of the splitter and have sucessfully "styled" the PushButtons to the original "Outlook" (silver version) look similar to my screen grab above but without the minimize bar. The question is if you want the code fed back - I've changed both the header (replacing the topButton with a QLabel) and cpp and have added pngs to the resource file. Any interest?
Pete
Teerayoot
3rd May 2007, 14:31
How to install component?
After i build ,i got wwwidgets4.dll and wwwidgets4.lib
i put 2 files into qtdesigner plugin folder but nothing new component load.
???
elcuco
4th May 2007, 07:45
On linux this creates a file called libwwwidgets4plugin.a, I was under the impression that the plugins should be *.so files...?
not workign here as well.
pdolbey
4th May 2007, 07:53
See my bullet point 3 above
The "plugin" is being built with a staticlib setting in the pro file - I'm not sure if this is what you intended.
Pete
wysota
4th May 2007, 14:26
I'm back now, so I can answer all the questions :)
Since we are expecting the our private data to be derived from QwwPrivate. Why do the functions like d_func() use reinterpret_cast rather than a dynamic_cast ?
1) Qt works exactly the same way
2) dynamic cast is not needed as the component designer knows the class name, so there is no point of using dynamic cast because you can't access pimpl from outside the class anyway.
3) dynamic_cast relies on RTTI from the compiler, so you'd want to avoid that if possible.
I know you said not to to comment about "unstable" widgets,
That was because some things may not work, so I didn't want to see comments like "X doesn't work" - I already know it doesn't work :) Any other comments on unstable widgets are welcome.
but I had some minor success yesterday hacking the qwwnavigationbar component into some sort of stability.
The navigation bar is stable, the problem with it is that you can't use its Designer plugin correctly, because of a major bug in Qt.
I've got the primary functionality working with the PushButtons activating the correct QWidget in the top half of the splitter and have sucessfully "styled" the PushButtons to the original "Outlook" (silver version) look similar to my screen grab above but without the minimize bar. The question is if you want the code fed back - I've changed both the header (replacing the topButton with a QLabel) and cpp and have added pngs to the resource file. Any interest?
Sure, let's have a look :). I don't think you have to add any images to the resource file, as CSS capabilities from Qt should allow you to make use of external images. About the button in the header - you can access the button and disable its "clicking" functionality if you don't like it without modifying the actual class (or you can subclass of course).
How to install component?
After i build ,i got wwwidgets4.dll and wwwidgets4.lib
i put 2 files into qtdesigner plugin folder but nothing new component load.
You should have run "nmake install" after the compilation. The dll needs to be present in both the lib directory (so that you can make use of the component from your applications) and in the bin directory (so that Designer can access it). Furthermore you should have the file "wwwidgets4plugin.dll" available as well and it should land in your plugins/designer folder (nmake install should take care of that).
On linux this creates a file called libwwwidgets4plugin.a, I was under the impression that the plugins should be *.so files...?
Well... you should have received a .so file if you didn't stick any "static" keywords during preconfiguration. I'll have a look at the project file to see what might have gone wrong and I'll get back to you on that.
wysota
4th May 2007, 14:35
Looks like I missed some comments...
The nmake install installs the dll into the QTDIR/lib folder, not the bin folder - yet another PATH entry required then?
No, it should have installed in both directories. As QMake doesn't seem to support installing into two dirs I had to hack the install script a little and didn't have time to test it properly, so it might have not worked.
There's no "d" suffix to discriminate between debug and release build as suggested in the help pages. (I tend to use bin/bind folders as a model for my app builds but this is supposed to act a standard Qt extension)
True, I didn't think of that, although the library is meant to be compiled against release version of Qt as that's how Designer is compiled. So if you want a debug release of the widget library, you have to adjust the name yourself for now. I'll correct it later.
The "plugin" is being built with a staticlib setting in the pro file - I'm not sure if this is what you intended.
No, it certainly shouldn't happen. Maybe KDevelop changed the project file behind my back again.
Still trying to get it working - I'm after one of those marvellous "Outlook 2003" navigation bars (and I saw some of the flame wars on the "other" Qt forum).
I was throwing the flames myself as I consider the bar stupid (waste of space, etc.), but if people need it, then it might be worth creating one.
However I've already sorted out the styling of QPushButtons - just trying to get the behaviours the same.
It should be very easy to change the appearance using CSS. If you have any comments about the functionality of the component, please don't hesitate to put them here. I have never used the Outlook bar myself, so I might be wrong about how it should work.
Thanks for the comments, I'm waiting for more.
pdolbey
4th May 2007, 16:45
I was throwing the flames myself as I consider the bar stupid (waste of space, etc.), but if people need it, then it might be worth creating one.
I noticed that - thats why I was suprised to see the widget in your package ;)
It should be very easy to change the appearance using CSS. If you have any comments about the functionality of the component, please don't hesitate to put them here. I have never used the Outlook bar myself, so I might be wrong about how it should work.
See my second post - I have the widget both functioning stable enough for my needs, and styled to the MS look (but not necessarily feel). I thought I might change your interface to allow the style to be removed to give a vanilla OS look to the pushbuttons. However it is your library and it wouldn't be fair of me to make changes that might become a core element of my own project without telling you or giving you the opportunity to review them.
Cheers, Pete
wysota
4th May 2007, 18:28
I thought I might change your interface to allow the style to be removed to give a vanilla OS look to the pushbuttons. However it is your library and it wouldn't be fair of me to make changes that might become a core element of my own project without telling you or giving you the opportunity to review them.
From what I understand the only change needed is to call (or not) setStylesheet() with a proper string that will change the look (and possibly some of the "feel" as well) of the widget.
pdolbey
4th May 2007, 22:19
The navigation bar is stable, the problem with it is that you can't use its Designer plugin correctly, because of a major bug in Qt.
Unfortunately, when you claimed the widget was unstable it wasn't clear what this meant. When I started testing it I used a test routine like this
#include <QtGui>
#include <qwwnavigationbar.h>
int main(int argc, char ** argv)
{
QApplication app(argc, argv);
QMainWindow* win = new QMainWindow();
QwwNavigationBar* nav = new QwwNavigationBar(win);
nav->addWidget(new QFrame(), "First Widget");
nav->addWidget(new QFrame(), "Second Widget");
nav->addWidget(new QFrame(), "Third Widget");
win->setCentralWidget(nav);
win->show();
return app.exec();
}
which creates the screen window attached. The text for the second and third widgets was missing. This is when I started hacking :D . I believe I have a working solution, but as I can't be sure that this matches your original design, I'd rather PM the changes to you.
Pete
wysota
4th May 2007, 22:36
AFAIR the titles are taken from the "windowTitle" property of widgets added to the bar (that's one of the workarounds for one of Qt Designer problems), so this should work:
QwwNavigationBar* nav = new QwwNavigationBar(win);
QFrame *frm = new QFrame;
frm->setWindowTitle("First widget");
nav->addWidget(frm);
frm = new QFrame;
frm->setWindowTitle("Second widget");
nav->addWidget(frm);
frm = new QFrame;
frm->setWindowTitle("Third widget");
nav->addWidget(frm);
The same goes for windowIcon property and the decoration of the button. I can't be certain the current code works this way (and I can't test it on this computer), but it is the way it was meant to work.
pdolbey
5th May 2007, 08:45
Unfortunately that pattern isn't obvious from either the interface description, or from my initial test with only one button that worked "correctly". I could see that window titles were being used in the code, but I didn't realise that these were supposed to be the primary title source, and when I have specified text in my method call I would have expected it to have been displayed. Thats whay I thought the widget was inherenently unstable.
Pete
wysota
5th May 2007, 11:10
Unfortunately that pattern isn't obvious from either the interface description, or from my initial test with only one button that worked "correctly". I could see that window titles were being used in the code, but I didn't realise that these were supposed to be the primary title source, and when I have specified text in my method call I would have expected it to have been displayed. Thats whay I thought the widget was inherenently unstable.
That's why the widget is called "unstable" and the whole release "beta" :) The interface of the navigation bar will change a bit because some things will be done outside the widget and inside Designer (just like with the task panel). When this is done, the behaviour will be coherent.
wysota
24th September 2007, 22:27
Ok, I finally forced myself and published the next, (almost) fully usable beta of wwWidgets.
http://www.wysota.eu.org/wwwidgets
All comments are of course welcome.
Oh... and of course a screenshot of some of the widgets.
http://www.wysota.eu.org/wwwidgets/screenshots/all.png
pdolbey
27th September 2007, 21:16
Building on Windows, I get
1>.\qwwfilechooser\qwwfilechooser.cpp(79) : error C3083: '{ctor}': the symbol to the left of a '::' must be a type
1>.\qwwfilechooser\qwwfilechooser.cpp(228) : error C3083: '{ctor}': the symbol to the left of a '::' must be a type
Both lines look like
int mar = style()->pixelMetric(QStyle::QStyle::PM_DefaultFrameWidth, &opt, this);
Removing redundant "QStyle" fixes compilation, but I've now got some linker errors that I'm trying to sort out.
P
wysota
27th September 2007, 21:33
Hmm... you're right, I don't know how the doubled QStyle happened to be there. If you define WW_NO_FILECHOOSER in the project file, those problems should vanish - the widget is not ready yet anyway... What exact linker errors do you get?
pdolbey
27th September 2007, 21:58
Its the plugin that's giving the problem. The "widgets" project has created dll and lib files sucessfully. Running within Visual Studio, I get
1>------ Build started: Project: wwwidgets4plugin, Configuration: Debug Win32 ------
1>Linking...
1>LINK : warning LNK4044: unrecognized option '/L../widgets/release'; ignored
1>LINK : warning LNK4044: unrecognized option '/L../widgets/debug'; ignored
1> Creating library debug\wwwidgets4plugin.lib and object debug\wwwidgets4plugin.exp
1>colorlisteditor.obj : error LNK2019: unresolved external symbol
public: __thiscall ColorModel::ColorModel(class QObject *)"
(??0ColorModel@@QAE@PAVQObject@@@Z)
referenced in function
"public: __thiscall ColorListEditor::ColorListEditor(class QWidget *,class QFlags<enum Qt::WindowType>)"
??0ColorListEditor@@QAE@PAVQWidget@@V?$QFlags@W4Wi ndowType@Qt@@@@@Z
1>qwwcolorbuttoniface.obj : error LNK2001: unresolved external symbol
"public: __thiscall ColorModel::ColorModel(class QObject *)"
(??0ColorModel@@QAE@PAVQObject@@@Z)
1>qwwcolorcomboboxiface.obj : error LNK2001: unresolved external symbol
"public: __thiscall ColorModel::ColorModel(class QObject *)"
(??0ColorModel@@QAE@PAVQObject@@@Z)
1>colorlisteditor.obj : error LNK2019: unresolved external symbol
"public: class QModelIndex __thiscall ColorModel::addColor(class QColor const &,class QString const &)"
(?addColor@ColorModel@@QAE?AVQModelIndex@@ABVQColo r@@ABVQString@@@Z)
referenced in function
"protected: void __thiscall ColorListEditor::setColorMap(void)" (?setColorMap@ColorListEditor@@IAEXXZ)
1>qwwcolorbuttoniface.obj : error LNK2001: unresolved external symbol
"public: class QModelIndex __thiscall ColorModel::addColor(class QColor const &,class QString const &)"
(?addColor@ColorModel@@QAE?AVQModelIndex@@ABVQColo r@@ABVQString@@@Z)
1>qwwcolorcomboboxiface.obj : error LNK2001: unresolved external symbol
"public: class QModelIndex __thiscall ColorModel::addColor(class QColor const &,class QString const &)"
(?addColor@ColorModel@@QAE?AVQModelIndex@@ABVQColo r@@ABVQString@@@Z)
1>qwwfilechooseriface.obj : error LNK2019: unresolved external symbol
"public: __thiscall QwwFileChooser::QwwFileChooser(class QWidget *)"
(??0QwwFileChooser@@QAE@PAVQWidget@@@Z) referenced in function
"public: virtual class QWidget * __thiscall QwwFileChooserIface::createWidget(class QWidget *)"
(?createWidget@QwwFileChooserIface@@UAEPAVQWidget@ @PAV2@@Z)
1>qwwrichtextbuttoniface.obj : error LNK2019: unresolved external symbol
"public: __thiscall QwwRichTextButton::QwwRichTextButton(class QWidget *)"
(??0QwwRichTextButton@@QAE@PAVQWidget@@@Z) referenced in function
"public: virtual class QWidget * __thiscall QwwRichTextButtonIface::createWidget(class QWidget *)"
(?createWidget@QwwRichTextButtonIface@@UAEPAVQWidg et@@PAV2@@Z)
1>qwwtextspinboxiface.obj : error LNK2019: unresolved external symbol
"public: __thiscall QwwTextSpinBox::QwwTextSpinBox(class QWidget *)"
(??0QwwTextSpinBox@@QAE@PAVQWidget@@@Z) referenced in function
"public: virtual class QWidget * __thiscall QwwTextSpinBoxIface::createWidget(class QWidget *)"
(?createWidget@QwwTextSpinBoxIface@@UAEPAVQWidget@ @PAV2@@Z)
1>debug\wwwidgets4plugin.dll : fatal error LNK1120: 5 unresolved externals
...but I wouldn't loose any sleep over it tonight.
Pete
wysota
27th January 2008, 16:17
I'm pleased to announce the immediate availability of wwWidgets 0.8
The main effort has been put on compilability with gcc, msvc and mingw and compatibility with Qt4.4. Apart from obtaining those goals (at least I hope so), the set is extended with new widgets such as:
QRichTextEdit - a widget that turns QTextEdit into a usable selfsufficient rich text editor
http://www.wysota.eu.org/wwwidgets/screenshots/qwwrichtextedit.png
QwwButtonLineEdit - a lineedit class that combines the line edit with a programmable button.
http://www.wysota.eu.org/wwwidgets/screenshots/qwwbuttonlineedit.png
Derived widgets such as QwwClearLineEdit, QwwResetLineEdit and QwwFileChooser are also available.
http://www.wysota.eu.org/wwwidgets/screenshots/qwwclearlineedit.png http://www.wysota.eu.org/wwwidgets/screenshots/qwwfilechooser.png
Full capabilities and full Designer integration is available for very recent (late January 2007) snapshots of Qt 4.4, but the whole set should compile with earlier snapshots as well as Qt 4.3 and Qt 4.2.
Please note that though wwWidgets are fully usable, the version 1.0 has not been reached yet and so the API and ABI may (and probably will) change in future releases.
The website has not yet been fully updated with docs and descriptions. In any doubt, please ask questions - I will gladly answer them.
Visit http://www.wysota.eu.org/wwwidgets for more details and download. Binary releases of the set may be available upon request.
All comments and other feedback is greatly appreciated.
pdolbey
28th January 2008, 14:30
wysota,
As you must realize, I await these release eagerly. However your website doesn't seem to responding at the moment.
Pete
wysota
28th January 2008, 15:19
Hmm... really? It works fine for me.
Attached you'll find the 0.8 source code archive in case you continue to be unable to access the website.
magland
28th January 2008, 16:06
Everything works great with MinGW. However, when I try to compile/install using msvc, I have some problems.
I did:
qmake
nmake
nmake install
Everything seems fine, but when I compile and run an example, it complains that it is missing mingw dll. ???!
So, I tried to link directly to the library (i.e. not using CONFIG += wwwidgets) and everything worked fine. So it must be a problem with wwwidgets.prf with msvc. ??
I am using Qt 4.3.3
wysota
28th January 2008, 16:24
Everything works great with MinGW
Good, MinGW was the platform giving me the most trouble :)
Everything seems fine, but when I compile and run an example, it complains that it is missing mingw dll. ???!
It means you link against a dll that has been built using MinGW and not MSVC.
So, I tried to link directly to the library (i.e. not using CONFIG += wwwidgets) and everything worked fine. So it must be a problem with wwwidgets.prf with msvc. ??
It's probably a problem with your configuration. Your two installs must have somehow interfered one another. Maybe you used wrong qmake or something... I have MSVC and MinGW installed side by side and both of them behave fine.
Oh, by the way - I'd like to thank Artur (aka Calhal) for helping me with MinGW compilation. Special thanks also go to Johan who has been testing my set with MinGW in earlier releases.
pdolbey
28th January 2008, 18:09
Hmm... really? It works fine for me.
Attached you'll find the 0.8 source code archive in case you continue to be unable to access the website.
I'm on a highly restricted environment at work, having to run the internet via Citrix, but I don't normally receive the tcp timeout error I got unless the target site is unavailable. Anyway thanks for putting the release out as an attachment. I'll grab it from my home machine later - and see if your web site is reachable from home. I'll only add to this thread if it isn't.
Pete
elcuco
28th January 2008, 19:04
WOW.... this is just "bad"... a very "bad release" ... first time I do take a look into it deeply :)
There are some issues with some widgets, the documentation is very poor, no static library (I sure would like the demos to be linked statically so I can test it without the library to be installed), no copyright in the TGZ on this thread... but still, very impressive. Continue with the good job!
Funny you have this richtext editor, I am working on something very similar, but mine has a tabbar at the bottom, so you can edit the HTML source. Is it possible to add such feature to the rich text editor? Also, how do I set the icons of the actions in that widget? the QActions are not exported outside the widget's interface.
wysota
28th January 2008, 20:03
WOW.... this is just "bad"... a very "bad release" ... first time I do take a look into it deeply :)
lol :)
There are some issues with some widgets
Yep, I know :)
the documentation is very poor
I'm still battling the xsl template.
no static library
Hmm... if you run qmake CONFIG+=staticlib (or whatever it was) it should compile fine.
(I sure would like the demos to be linked statically so I can test it without the library to be installed)
I'll think about it.
no copyright in the TGZ on this thread...
Yeah, I'm aware of that... But hey, it's 0.8 and not 1.0 :)
but still, very impressive. Continue with the good job!
Thanks. As I said, the main effort was put to make it compilable everywhere - that used to be the biggest problem. I'm only a one-man army, so until I develop some tools to make my life easier, everything takes time. I already have a wizard for creating plugin code which at least makes it easy to add widgets to the set without necessary copy&paste. The project file is quite advanced as well, so adding new widgets requires only to add the class name to one variable and everything else is taken care of.
Funny you have this richtext editor, I am working on something very similar, but mine has a tabbar at the bottom, so you can edit the HTML source. Is it possible to add such feature to the rich text editor?
Hmm... I'll think about it. Maybe not as a tab but as a button or menu item. The downside is that Qt generates a messy html code so it might not look very nice.
Also, how do I set the icons of the actions in that widget?
I haven't tried that but you should be able to substitute the resources from which the icons are taken. The widget will be extended in the next release - I plan to have the toolbar configurable and in general more flexible but as I'm lazy (and undermanned) I'm looking for an easy way to make the toolbar more flexible, currently if icons don't fit into the widget, they are not visible - it shouldn't be like that.
the QActions are not exported outside the widget's interface.
That will probably change in the future. The widget is not ready yet, but I felt like releasing it anyway. I had to release 0.8 now once I made everything compilable and 4.4 compatible (thanks to Jarek Kobus).
0.9 should be released shortly once I get some feedback about 0.8. Planned for that release is functionality freeze (until 1.0), ABI freeze and improved modularity. All that is almost ready. I also have some neat ideas for the plugin, maybe I'll manage to implement them in 0.9. You may already see the extra menu in Designer when the plugin is active.
Please keep that feedback coming!
pdolbey
28th January 2008, 20:37
Hi again,
No problems downloading from the web site or compiling with VS2005 Ent. The only minor gotcha is that the wwwidgets4.dll is being dumped into the Qt4 "lib" folder, not the "bin" folder, which means its not in my PATH - but easily moved. I'll start playing with it tonight.
My only other query is over the license - will this definitely be GPL or is LGPL a possibility?This has an impact with some of my QtOCC collaborators on sourceforge (http://qtocc.sourceforge.net), which we will license under LGPL in accordance with the GPL_EXCEPTION.TXT given with Qt4.3.3. The choice of license is obviously yours, and you may feel strongly about the GPL/LGPL argument - but I thought I'd ask if a relaxation was possible.
Cheers, Pete
p.s. no release is ever a "bad release"!
wysota
28th January 2008, 21:52
Hi again,
No problems downloading from the web site or compiling with VS2005 Ent. The only minor gotcha is that the wwwidgets4.dll is being dumped into the Qt4 "lib" folder, not the "bin" folder,
It should land in the bin as well. The mechanism is not perfect as the library has to be called "wwwidgets4.dll" and be present in release or debug subdirectories after the compilation, but it worked fine last time I checked it. Maybe it missed the right name in your case.
My only other query is over the license - will this definitely be GPL or is LGPL a possibility?
Hmm... I'm open to suggestions, but I think that because of Qt being GPL, I can't licence it to LGPL. If you prove me wrong, I can think of making an exception.
This has an impact with some of my QtOCC collaborators on sourceforge (http://qtocc.sourceforge.net), which we will license under LGPL in accordance with the GPL_EXCEPTION.TXT given with Qt4.3.3. The choice of license is obviously yours, and you may feel strongly about the GPL/LGPL argument - but I thought I'd ask if a relaxation was possible.
Oh, I think this proves me wrong. I'm against releasing under LGPL as this would allow people to use my widgets in commercial applications without buying a licence. I'm putting much effort in the development and I haven't received a single sign of appreciation other than a post in this thread (meaning no donations to my paypal account) stating about bad releases :) My widgets might not be of top notch quality just yet but I think I'm constantly improving so I wouldn't want someone to just take it and earn big money with it without me knowing. Unfortunately it is a rare case that LGPL is really respected by commercial applications. For instance the licence requires the licence file and an acknowledgement to be present in the product using the LGPL-licenced library. Are you sure this is respected?
p.s. no release is ever a "bad release"!
I wouldn't say that :)
pdolbey
28th January 2008, 23:00
Yes, if you expect to earn some remuneration you can't take the risk of LGPL'ing it as its the only leverage you have on commercial users - I completely understand. And its difficult (just about impossible) to go back to GPL if you make it available under LGPL.
From my perspective, it means that I cannot tightly integrate with the library thereby forming a dependency, but I should be able to use it for producing nice looking application "containers", so long as the libs are logically separated (I think).
Pete
wysota
28th January 2008, 23:15
From my perspective, it means that I cannot tightly integrate with the library thereby forming a dependency, but I should be able to use it for producing nice looking application "containers", so long as the libs are logically separated (I think).
I'm sorry, I have no idea :)
From what I understand I can licence the library any way I like as long as I don't break the licence of components I use, so in theory I could licence it in such a way that I make an exception for a particular project. But honestly - I don't know that, these are only my assumptions. I'm not a lawyer nor an expert on open source licencing scheme. If you know better - enlighten me :)
pdolbey
29th January 2008, 18:21
Basically if you license it to a project such as mine with LGPL, you give me the right to pass it on to others with the same license - and I don't think you want to do that! However I can use your GPL'd library and my LGPL'd library together in an application, but only if the final application is also GPL. I can live with that.
Pete
magland
30th January 2008, 12:05
Thanks W, I like these widgets. Not sure why I was having trouble before, but it seems to be resolved now.
If you'd like to see QwwRichTextEdit inside an IDE, here's a QwwRichTextEdit plugin for HaiQ (http://groups.google.com/group/haiq/web/QwwRichTextEdit%20Plugin).
By the way, it would be nice to be able to edit hyperlinks and insert images.... or maybe that should be done by the user in subclass?
wysota
30th January 2008, 20:46
Thanks W, I like these widgets.
Thanks, I appreciate it.
Not sure why I was having trouble before, but it seems to be resolved now.
I'm glad most compile problems have been resolved.
If you'd like to see QwwRichTextEdit inside an IDE, here's a QwwRichTextEdit plugin for HaiQ (http://groups.google.com/group/haiq/web/QwwRichTextEdit%20Plugin).
Great :) Keep up the good work, maybe you'll find some use for other widgets of mine too. Maybe the tip widget (it'll be improved in 0.9) and the wwbuttonlineedit family can be of use to you.
By the way, it would be nice to be able to edit hyperlinks and insert images.... or maybe that should be done by the user in subclass?
I didn't have plans for hyperlinks and images, but it shouldn't be hard to implement them (either in a subclass or directly). I'll think of it. Right now I have to make the list work properly (currently list nesting is incorrect) and improve the interface so that it is customizable.
magland
9th February 2008, 20:46
Perhaps this is not a wwWidgets-specific question, but nevertheless....
One problem I am having with the rich text edit widget is that when I save a file as type .html and then view in a browser, the spacing is all different. Is there something I should use besides toHtml() to save the file, or perhaps I should save file as a different (non-html) type?
Ideally, I'd like to have html page display with same spacing that I see in the rich text widget (i.e. line indents, etc) . Is that possible?
wysota
9th February 2008, 22:35
Qt uses a wacky html formatting. You probably experience issues related to font differences. This is surely not wwWidgets related.
A probable solution would be to set a proper font either on the widget or on the document (before or after exporting it to html), but it's just a wild guess and really more of a long shot.
Gopala Krishna
16th February 2008, 14:43
Great collection wysota! Thanks :)
I have suggestions for new widgets. What do you think ?
A dialog/widget to edit gradients (all - linear, radiant and conical)
A dialog/widget to set pen and brush properties (including cap, milter joints..)
Finally a combo of the above
If you are interested in above probably you can have two modes, one "Lesser mode" which shows only basic properties.
The "More mode" could show each and every property described above.
wysota
16th February 2008, 14:54
Great collection wysota! Thanks :)
Thank you.
I have suggestions for new widgets. What do you think ?
A dialog/widget to edit gradients (all - linear, radiant and conical)
A dialog/widget to set pen and brush properties (including cap, milter joints..)
Finally a combo of the above
I have the first one in plans. I didn't think about the second one, but it might be a good idea to make a widget to handle that. The third one is a simple composition of the first two, so one can use two separate widgets.
If you are interested in above probably you can have two modes, one "Lesser mode" which shows only basic properties.
The "More mode" could show each and every property described above.
Yeah, maybe. I'm trying to be implementing widgets and not dialogs as they are more robust and can handle more use cases, so probably this will be the case here as well.
Thanks for your suggestions. 0.9 should be available soon, so it probably won't go into the set until 1.0. That in turn will freeze development of new widgets in the stable branch, so if those widgets don't make it into 1.0, they probably won't be available until 1.2.
If you have suggestions how the gradient editor should look like, feel free to drop me a line either here or by email. I've seen gradient editors from KDE, Trolltech and Corel applications but I'm not sure I like any of them.
Gopala Krishna
16th February 2008, 15:09
If you have suggestions how the gradient editor should look like, feel free to drop me a line either here or by email. I've seen gradient editors from KDE, Trolltech and Corel applications but I'm not sure I like any of them.
I haven't seen any of them :( Any links ? Googling didn't help me.
Actually i wanted to do myself a simple gradient editor widget and didn't find any pointer to this.
wysota
16th February 2008, 15:53
If you open stylesheet editor in Designer 4.4, there is an option to edit a gradient. KDE4 has its gradient editor as well (sorry, no link now). Corel has a very simple linear gradient editor where you can define "stops" and colours for them and there is a bar that shows the result live. Other gradients in Corel DRAW are made interactively by dragging the mouse over the drawing sheet and/or choosing the parameters from comboboxes or spinboxes.
marcel
16th February 2008, 19:32
Corel has a very simple linear gradient editor where you can define "stops" and colours for them and there is a bar that shows the result live. Other gradients in Corel DRAW are made interactively by dragging the mouse over the drawing sheet and/or choosing the parameters from comboboxes or spinboxes.
Phtotshop, Illustrator and InDesign, all have a similar way of defining gradients. So does PaintShopPro and many other design programs.
Probably the users prefer this way...
wysota
16th February 2008, 20:40
If you mean the bar, then it only allows one to edit a linear gradient.
marcel
16th February 2008, 20:45
No, I meant the entire gradient palette, with all the options. You can also change the gradient style from there - linear, radial, etc.
Although, the pdf spec defines a few "exotic" gradient types, such as Coon's patch gradients, which are all supported(read-only) by all Adobe products but I haven't yet found a way to create one with them.
I believe Qt, when printing to pdf, saves all gradients as coon patch.
wysota
17th February 2008, 18:17
No, I meant the entire gradient palette, with all the options. You can also change the gradient style from there - linear, radial, etc.
Yes, but you won't be seeing the final effect in action - the gradient will still be visualized as a linear gradient. I like the gradient editor from Qt Designer way way more.
Gopala Krishna
23rd February 2008, 12:15
While trying to use your classes i felt the following addition to QwwRichTextEdit would rock it more!
Toolbuttons to control the subscript and superscript of text.
An intelligent toHtml() method which isn't bloated as is that of QTextEdit
wysota
23rd February 2008, 18:10
Toolbuttons to control the subscript and superscript of text.
They will be available in the upcoming release.
An intelligent toHtml() method which isn't bloated as is that of QTextEdit
That's more complicated. The problem is within QTextDocument and not QTextEdit so it should be solved there - a class exporting QTextDocument to proper html would be needed as a general purpose solution. It's not that hard to implement - you can traverse nodes of the document easily and create output of your choice.
Gopala Krishna
24th February 2008, 13:05
If i remember correctly, i read on planet kde that someone has written a script to reduce the richtext's html generated by designer. Googling didn't help me.
Anyway's i will try to write one if i can't find the script.
wysota
24th February 2008, 13:10
If i remember correctly, i read on planet kde that someone has written a script to reduce the richtext's html generated by designer.
In my opinion this is not the way to go. You double the work this way - first QTextDocument generates its html representation and then the script simplifies it into another html. It's better to generate a clean html in the first place and its easily achievable - all that it takes is a bit of brainstorming how to avoid pitfalls that may arise and then apply those developed rules during document traversal.
I'm thinking of developing an output generator for the MediaWiki syntax. Currently I don't have time to do it, but maybe in the near future I will.
elcuco
24th February 2008, 14:46
Someone is working on a MediaWiki "rich text editor" control for Qt., again, look in the KDE planet.
About editing HTML: has anyone tried use the webkit editor control...? I know it can display HTML (it's pretty good at it), but how about editing, anyone tested?
Gopala Krishna
25th February 2008, 10:07
In my opinion this is not the way to go. You double the work this way - first QTextDocument generates its html representation and then the script simplifies it into another html. It's better to generate a clean html in the first place and its easily achievable - all that it takes is a bit of brainstorming how to avoid pitfalls that may arise and then apply those developed rules during document traversal.
I'm thinking of developing an output generator for the MediaWiki syntax. Currently I don't have time to do it, but maybe in the near future I will.
I agree but as you won't be fetching the tidied rich text very often(other than saving and for copying the text), it shouldn't cause much difference though there is double work.
Anyway i am looking forward for your output generator. :)
magland
16th July 2008, 14:21
Attached is a simple extension to QwwRichTextEdit that adds a "link" button, allowing user to add hyperlinks. Also two new signals are emited: anchorHovered(QString) and anchorClicked(QString).
(Wysota, feel free to use this code or modify it as you like.)
wysota
16th July 2008, 16:07
Thanks. I'll include it in the next release of the widget set. It should be out today or tomorrow.
pospiech
25th July 2008, 12:53
Do you except feature requests?
I require something which could be called doubleExponentialSpinBox. That should be a SpinBox that excepts double values but displays them as "1234.0234 e -123".
The Buttons should then increase either the value or the exponential depending on the position of the cursor.
I require this very often since I am a physicist and deal with high exponential values quite often. However it is not possible to display these in any standard spinbox.
Matthias
wysota
25th July 2008, 14:36
Do you except feature requests?
Sure, why not.
I require something which could be called doubleExponentialSpinBox. That should be a SpinBox that excepts double values but displays them as "1234.0234 e -123".
This can be done with the regular double spinbox by reimplementing two methods.
The Buttons should then increase either the value or the exponential depending on the position of the cursor.
Ah.. I see... seems nice, I'll look into it.
vBulletin® v3.7.1, Copyright ©2000-2008, Jelsoft Enterprises Ltd.