Source i (link to git-repo or to original if based on someone elses unmodified work):

Add the source-code for this project on opencode.net

4
Become a Fan
6.1

Description:
QLed is a Led custom widget plugin for Qt Designer 4.x
It requires Qt library 4.x

It allows to choose among Circle, Square, Triangle, RoundRect shapes and also allows to choose among Red,Green,Yellow,Orange,Purple,Blue on-colors. Off color is Grey.
Last changelog:

Version 0.6.2
Bug fixing and improvement.

Version 0.6.1
Bug fixing.

Version 0.6.0
A simple example is provided. Package QLed-0.6.0 contains a new example directory

Version 0.5.1
Some minor changes. Code readability improvement.

Version 0.5.0
This version allows to choose among Circle, Square, Triangle, RoundRect shapes and also allows to choose among Red,Green,Yellow,Orange,Purple,Blue on-colors. Off color is Grey.

Version 0.5.0 beta
QLed shape does not use graphics primitives (line, circle, gradient...) any more. An SVG file is used instead.
This version is beta, I'm working on the source code to improve it and to add new shapes.

Version 0.4.0

Improvements:
-Modified color management. Now the color (QColor) is property for Qt Designer.


-------------------
Version 0.3
Added antialiasing


Ratings & Comments

44 Comments

sonjabritss

Hi! I'm trying to install the plugin, but when I type make I get the following error: make -f Makefile.Release make[1]: Entering directory '/home/sonja/Downloads/qtled' g++ -c -m64 -pipe -O2 -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SVG_LIB -DQT_DESIGNER_LIB -DQT_UIPLUGIN_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_XML_LIB -DQT_CORE_LIB -DQDESIGNER_EXPORT_WIDGETS -I. -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtSvg -isystem /usr/include/x86_64-linux-gnu/qt5/QtDesigner -isystem /usr/include/x86_64-linux-gnu/qt5/QtUiPlugin -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtXml -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -Irelease -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++-64 -o release/qled.o qled.cpp In file included from qled.h:21:0, from qled.cpp:23: /usr/include/x86_64-linux-gnu/qt5/QtDesigner/QDesignerExportWidget:4:4: warning: #warning Header is deprecated. Please include instead. [-Wcpp] # warning Header is deprecated. Please include is deprecated. Please include instead. [-Wcpp] # warning Header is deprecated. Please include is deprecated. Please include instead. [-Wcpp] # warning Header is deprecated. Please include ’ Q_EXPORT_PLUGIN2(customwidgetplugin, QLedPlugin) ^ qledplugin.cpp:113:1: error: expected unqualified-id at end of input Q_EXPORT_PLUGIN2(customwidgetplugin, QLedPlugin) ^ Makefile.Release:286: recipe for target 'release/qledplugin.o' failed make[1]: *** [release/qledplugin.o] Error 1 make[1]: Leaving directory '/home/sonja/Downloads/qtled' Makefile:38: recipe for target 'release' failed make: *** [release] Error 2

fabian_sl

Hi! I've installed my Qled plugin and already see Qled on QtCreator, but since I'm doing all my GUI on Python3, I'm converting my .ui files into .py with pyuic5. The problem is that after doing that and running my .py with my GUI with a Qled widget I'm getting "ImportError: No module named 'qled' Any idea what could be wrong or missing?

Eterias10

Hola buenas, quisiera saber como instalar este widget en linux! estoy trabajando en una raspberry pi!

WeePee

0. Using Raspberry Pi (2) with installed QT4 (using Linux on RaspPi) 1. I've installed latest qled from qt-apps.org 2.Found and performed the steps from INSTALL file 2.1 qmake qledplugin.pro 2.2 make 3. sudo cp qled.h /usr/share/qt4/include 4. Add "LIBS += -lqledplugin" to LED1.pro with LED1 = Product file of my demo project 5. qled.h and qledplugin.h in /usr/include/qt4/QT and in /usr/include/qt4 6. qledplugin.dll in /usr/lib/arm-linuxabihf/qt4/plugins/designer and /usr/lib/arm-linuxabihf/qtcreator/plugins/designer /usr/lib/arm-linuxabihf/qtcreator/plugins/Nokia/designer 7. Create in /usr/lib/qt4 directory plugins to solve missing symbolic link to plugins in /usr/share/qt4/plugins 8. in QT Creator (mainwindow.ui I have below "Lab Widget" the new QLed and can use widget in code 9. In Compile output of QT Creator I can see successful build of main.o, mainwindow.cpp and moc_mainwindow.o 10. Linker step usin "-lqledplugin" presents "cannot find -lqledplugin Below the original error output: ================================== 16:37:53: Running steps for project LED1... 16:37:54: Starting: "/usr/bin/qmake-qt4" /home/pi/QT4/LED1/LED1/LED1.pro -r -spec linux-g++ 16:37:54: The process "/usr/bin/qmake-qt4" exited normally. 16:37:54: Starting: "/usr/bin/make" -w make: Entering directory '/home/pi/QT4/LED1/LED1-build-desktop-Qt_4_8_2__System__Release' /usr/bin/uic-qt4 ../LED1/mainwindow.ui -o ui_mainwindow.h g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_WEBKIT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I../LED1 -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -I../LED1 -I. -o main.o ../LED1/main.cpp g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_WEBKIT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I../LED1 -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -I../LED1 -I. -o mainwindow.o ../LED1/mainwindow.cpp /usr/bin/moc-qt4 -DQT_WEBKIT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I../LED1 -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -I../LED1 -I. ../LED1/mainwindow.h -o moc_mainwindow.cpp g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_WEBKIT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I../LED1 -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -I../LED1 -I. -o moc_mainwindow.o moc_mainwindow.cpp g++ -Wl,-O1 -o LED1 main.o mainwindow.o moc_mainwindow.o -L/usr/lib/arm-linux-gnueabihf -lqledplugin -lQtGui -lQtCore -lpthread /usr/bin/ld: cannot find -lqledplugin collect2: ld returned 1 exit status Makefile:105: recipe for target 'LED1' failed make: Leaving directory '/home/pi/QT4/LED1/LED1-build-desktop-Qt_4_8_2__System__Release' make: *** [LED1] Error 1 16:38:07: The process "/usr/bin/make" exited with code 2. Error while building/deploying project LED1 (target: Desktop) When executing step 'Make' ================================== Has anybody an idea where to add missing qledplugin ??? (Thanx in advance)

WeePee

0. Using Raspberry Pi (2) with installed QT4 (using Linux on RaspPi) 1. I've installed latest qled from qt-apps.org 2.Found and performed the steps from INSTALL file 2.1 qmake qledplugin.pro 2.2 make 3. sudo cp qled.h /usr/share/qt4/include 4. Add "LIBS += -lqledplugin" to LED1.pro with LED1 = Product file of my demo project 5. qled.h and qledplugin.h in /usr/include/qt4/QT and in /usr/include/qt4 6. qledplugin.dll in /usr/lib/arm-linuxabihf/qt4/plugins/designer and /usr/lib/arm-linuxabihf/qtcreator/plugins/designer /usr/lib/arm-linuxabihf/qtcreator/plugins/Nokia/designer 7. Create in /usr/lib/qt4 directory plugins to solve missing symbolic link to plugins in /usr/share/qt4/plugins 8. in QT Creator (mainwindow.ui I have below "Lab Widget" the new QLed and can use widget in code 9. In Compile output of QT Creator I can see successful build of main.o, mainwindow.cpp and moc_mainwindow.o 10. Linker step usin "-lqledplugin" presents "cannot find -lqledplugin Below the original error output: ================================== 16:37:53: Running steps for project LED1... 16:37:54: Starting: "/usr/bin/qmake-qt4" /home/pi/QT4/LED1/LED1/LED1.pro -r -spec linux-g++ 16:37:54: The process "/usr/bin/qmake-qt4" exited normally. 16:37:54: Starting: "/usr/bin/make" -w make: Entering directory '/home/pi/QT4/LED1/LED1-build-desktop-Qt_4_8_2__System__Release' /usr/bin/uic-qt4 ../LED1/mainwindow.ui -o ui_mainwindow.h g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_WEBKIT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I../LED1 -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -I../LED1 -I. -o main.o ../LED1/main.cpp g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_WEBKIT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I../LED1 -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -I../LED1 -I. -o mainwindow.o ../LED1/mainwindow.cpp /usr/bin/moc-qt4 -DQT_WEBKIT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I../LED1 -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -I../LED1 -I. ../LED1/mainwindow.h -o moc_mainwindow.cpp g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_WEBKIT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I../LED1 -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I. -I. -I../LED1 -I. -o moc_mainwindow.o moc_mainwindow.cpp g++ -Wl,-O1 -o LED1 main.o mainwindow.o moc_mainwindow.o -L/usr/lib/arm-linux-gnueabihf -lqledplugin -lQtGui -lQtCore -lpthread /usr/bin/ld: cannot find -lqledplugin collect2: ld returned 1 exit status Makefile:105: recipe for target 'LED1' failed make: Leaving directory '/home/pi/QT4/LED1/LED1-build-desktop-Qt_4_8_2__System__Release' make: *** [LED1] Error 1 16:38:07: The process "/usr/bin/make" exited with code 2. Error while building/deploying project LED1 (target: Desktop) When executing step 'Make' ================================== Has anybody an idea where to add missing qledplugin ??? (Thanx in advance)

EL91

Hi, I downloaded the plugin and followed the INSTALL instructions. Every instruction worked successfully. The problem is, when I open QtCreator, I don't find QLed in the Designer. By the way, after installing the plugin, "qledplugin.prl" and "libqledplugin.a" files are generated in my Qt\plugin\designer folder. ( No dll generated). Please help me

wally345

qled 0.6.2 - plugin successfully built and used on OpenSuse 13.1. Anyway, i would prefer to use the Promotion technique and not create a plugin. ( http://qt-project.org/doc/qt-4.8/designer-using-custom-widgets.html#promoting-widgets ) Can i do this with qled ?

spiderkarma

With a recent Qt, you can compile QLed into an app or static lib by removing QDESIGNER_WIDGET_EXPORT and the QtDesigner include from the QLed class definition.

peteklemm

I have been trying to get the qledplugin to be recognized by Qt 5.0.1, with no success. Anyone get this to work?

gRicky

I've got the same problem as others compiling the project on ubuntu 10.4

astodolski

I get the exact error when compiling on windows using MinGW compiler on Qt 4.8.4

beding

This is what I get when compiling on windows. QT 4.8 with MINGW. I am doing someting wrong ? g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"c:\QtSDK\Desktop\Qt\4.8.0\mingw\include\QtCore" -I"c:\QtSDK\Desktop\Qt\4.8.0\mingw\include\QtGui" -I"c:\QtSDK\Desktop\Qt\4.8.0\mingw\include" -I"c:\QtSDK\Desktop\Qt\4.8.0\mingw\include\ActiveQt" -I"debug" -I"." -I"..\example" -I"." -I"c:\QtSDK\Desktop\Qt\4.8.0\mingw\mkspecs\win32-g++" -o debug\moc_qled.o debug\moc_qled.cpp debug\moc_qled.cpp:75: warning: 'static void QLed::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)' redeclared without dllimport attribute: previous dllimport ignored debug\moc_qled.cpp:91: warning: 'QLed::staticMetaObjectExtraData' redeclared without dllimport attribute after being referenced with dll linkage debug\moc_qled.cpp:95: warning: 'QLed::staticMetaObject' redeclared without dllimport attribute after being referenced with dll linkage debug\moc_qled.cpp:104: warning: 'virtual const QMetaObject* QLed::metaObject() const' redeclared without dllimport attribute: previous dllimport ignored debug\moc_qled.cpp:109: warning: 'virtual void* QLed::qt_metacast(const char*)' redeclared without dllimport attribute: previous dllimport ignored debug\moc_qled.cpp:117: warning: 'virtual int QLed::qt_metacall(QMetaObject::Call, int, void**)' redeclared without dllimport attribute: previous dllimport ignored mingw32-make.exe[1]: Leaving directory `D:/HomeDrive/persoonlijk/QLED/example-build-desktop-Qt_4_8_0_for_Desktop_-_MinGW__Qt_SDK__Debug' debug\moc_qled.cpp:91: error: definition of static data member 'QLed::staticMetaObjectExtraData' of dllimport'd class mingw32-make.exe[1]: *** [debug/moc_qled.o] Error 1 mingw32-make.exe: *** [debug] Error 2 08:51:24: The process "C:\QtSDK\mingw\bin\mingw32-make.exe" exited with code 2. Error while building project example (target: Desktop) When executing build step 'Make'

rkellerm

I tried to install QLed to Qt 4.7 on WinXp using qmake qledplugin.pro. I got the following error message: --- Could not find mkspecs for your QMAKESPEC(win32-g++) after trying: C:\iwmake\build_vs2008_commercial_________________PADDING_______________ __\mkspecs Error processing project file: qledplugin.pro --- I don't understand the error and need some hints.

ZippityChap

Hello, I have the same problem when add qLed in QtCreator: Win32: undefined reference to `_imp___ZN4QLedC1EP7QWidge` My paths are: C:\Qt\4.7.4\bin; C:\Qt\mingw\bin\; My QtDesigner see this qLed, I had added it to QtDesigner, but how to do that QtCreator understand it? What and where I need to copy for this?

uberben

I have spent the past few hours fighting with Qt and cannot for the life of me get this Signal/Slot pair connected. I can connect to the slots that don't use QLed enums, but the ones that do will not let me use them no matter what I try. Here is how I am connecting to the slot from my MainWindowImpl object: connect( this, SIGNAL( setLEDColor( QLed::ledColor ) ), cpux_ql_ProgramCPUX, SLOT( setOnColor( QLed::ledColor ) ) ); This is the error message I'm getting: Object::connect: No such slot QLed::setOnColor( QLed::ledColor ) Object::connect: (sender name: 'MainWindow') Object::connect: (receiver name: 'cpux_ql_ProgramCPUX') I am using Qt Designer to make my ui and I am using QDevelop for compiling. Does anyone have any suggestions?

mutendb

I compile the qled app. When I try to include a qled in my project (I use vs2005 and qtDesigner) I obtain a list of errors like this one: "ERROR LNK2019: unresolved external symbol ... QLed::setShape(...". More specifically one of this errors for every function declared in the .h file. I had copy the dll file in "<QTDir>/lib" and in "<QTDir>/plugins/designer" Any one suggestion?? Thank you

deadleon

i have compiled the qledplugin.dll and qledplugin.a(release version).QT designer can use it, but qtcreator can not debug my app with the plugin. any solusion? some warning likesome thing "Redeclared without dllimport attribute after being referenced with dll linkage "

thoemmes

it seems like there is a memory leak in the code. every time you toggle the LED by clicking the checkbox in the example application new memory is allocated. I think this is because you create a QSvgRenderer at the beginning of the paintEvent method of QLed without freeing the memory at the end of the routine.

qphoton

Thank you for your comment. I will have a look on the widget. Bye paolo

franz123

Thank you for the fix in 0.6.2 ;) I was searching for the leak in my code for a while now and had no idea what the problem could be... After updating to this new version the bug is gone :) Had some LEDs blinking twice a second while my program was in progress and memory usage grew permanently.. Thanks a lot!

mikejongejan

Here is a fix for the memory leak: Replace free(renderer); at the end of QLed2::paintEvent(QPaintEvent *) by delete renderer;

shamusvw

I enjoy doing my layouts in code, not using Designer. As soon as I #include "qled.h" I get .exe exited with code -1073741515 error. I want to include following: QLed *led = new QLed(); Please advise. Shaun

shamusvw

I enjoy doing my layouts in code, not using Designer. As soon as I #include "qled.h" I get .exe exited with code -1073741515 error. I want to include following: QLed *led = new QLed(); Please advise. Shaun

THA

Dear I have little time testing QT. I installed QT 4.6, employment Creator QT 1.3.0, on Windows 2000 I compiled QLed, generating the debug version and release, I copied the release version qledplugin.dll in the C: \ Qt \ 2009.05 \ bin \ designer \ I created a new project with a form, I tried to load the plugin via the menu Tools -> Form Editor -> About Qt designer plugins. Plugin Information on the form, sample; Failed Plugins c: / Qt/2009.05/bin/designer/qledplugin.dll The add 'C: / Qt/2009.05/bin/designer/qledplugin.dll "uses incompatible Qt library. It was hoped the key "Windows msvc release full-config", but received "Windows mingw release full-config" To load the plugin in Qt Designer as a control, as I act? I suppose that when you load a dll plugin, this should appear as a more, like for example a combo box, label, .... And I just need to drag the control on my new form to dispose of the object, is this so? Why the error?, How can I solve? Thank you

metdos

How can I add this plug-in to qt-designer, I tried nmake but got some error messages, is there any other way to add plug-ins.

Pling
0 Affiliates
Details
license
version 0.6.2
updated
added
downloads 24h 0
mediaviews 24h 0
pageviews 24h 1

More Qt Widgets from qphoton:

QMeter
qphoton
last update date: 8 years ago

Score 6.5

QMLWidgets
qphoton
last update date: 8 years ago

Score 5.0

QtWidgets
qphoton
last update date: 8 years ago

Score 5.7

QCircularBar
qphoton
last update date: 10 years ago

Score 5.0

QtTimer
qphoton
last update date: 15 years ago

Score 5.0

QSwitch
qphoton
last update date: 15 years ago

Score 6.5

Other Qt Widgets:

Widget Virtual Keyboard
embitel
last update date: 15 years ago

Score 5.3

Widget Marquee Label
embitel
last update date: 15 years ago

Score 6.1

Widget Color Picker
embitel
last update date: 15 years ago

Score 4.7

QtitanDataGrid advanced Grid for Qt
BigZ1
last update date: 7 years ago

Score 5.7

QtitanRibbon Microsoft RibbonUI and Office Styles for Qt
BigZ1
last update date: 7 years ago

Score 5.2

Q7TaskBar
QDevelopper
last update date: 13 years ago

Score 6.1