custom-widgets

Why Qt5 creator doesn't detect my custom widget plugin?

安稳与你 提交于 2021-02-05 10:37:06
问题 I've built a Qt custom widget plugin found in a book "C++ programming with Qt 1st edition". When it finishes building I see a file "libiconeditorplugin.so" in /home/Itachi_dev/Qt/5.14.2/gcc_64/plugins/designer TEMPLATE = lib QT += designer widgets uiplugin CONFIG += release plugin HEADERS = ../iconeditor/iconeditor.h \ iconeditorplugin.h SOURCES = ../iconeditor/iconeditor.cpp \ iconeditorplugin.cpp RESOURCES = iconeditorplugin.qrc DESTDIR = /home/Raindrop7/Qt/5.14.2/gcc_64/plugins/designer

Django custom widget to split an IntegerField into hours and seconds fields in a Model Form

旧巷老猫 提交于 2020-01-12 10:30:28
问题 I am storing time duration as minutes in an IntegerField. In my front end form (Model Form), I want to split the input into one field for minutes and one field for hours. I also want to be able to use the InLineFormset. Can this be done in a nice way? I could use javascript, but that does not seeml like a good solution to me, or is it? 回答1: You want to use a MultiWidget. I'd suggest that you override the field itself. Have a look at the docs for creating custom fields. If you can, it might be

Kivy - Create new widget and set its position and size

穿精又带淫゛_ 提交于 2020-01-03 06:32:12
问题 got a little problem. So Iam trying to create my own widget, and i have succeed, only except for setting its size and position right(to be same as its parrent). class Story(App): def build(self): return MyWidgets().init() The app has GridLayout as a holder, into which i want to pass the StoryWidget class MyWidgets(object): def init(self): root = GridLayout(cols=2,rows=1) root.add_widget(StoryWidget()) root.add_widget(Button()) return root Story Widget goes as this: class StoryWidget(Widget):

pyqt adding a widget to a QListWidget

◇◆丶佛笑我妖孽 提交于 2019-12-25 04:24:24
问题 hi i created 2 files from qtdesigner and i created a new file with a class where i want to use these UIs that i created. this is the file creating the QListWidget from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except AttributeError: _fromUtf8 = lambda s: s class Ui_main_Dialog_lists(object): def setupUi(self, main_Dialog_lists): main_Dialog_lists.setObjectName(_fromUtf8("main_Dialog_lists")) main_Dialog_lists.resize(590, 521) self.main_verticalLayout = QtGui

How to create a custom date time widget for the django admin?

非 Y 不嫁゛ 提交于 2019-12-24 01:58:10
问题 My Problem: I have a model that accepts DateTimeField . The user enters this from the django-admin . But, I cant get a way to get the user's local timezone. So my best shot is forcing the user to enter the date-time in UTC . But for the users convenience, I do not want him/her to calculate each time the offset and then the time in UTC . Django doesn't seem to provide a way of doing this. What I intend to do: I want to create a custom widget that will also let the user choose the timezone

Design Application with Qt

筅森魡賤 提交于 2019-12-04 23:23:07
问题 I have to implement a graphical user interface design. The framework of choice is Qt. After some work on the implementation a few difficulties and questions turned out. The main point is that there are some fancy design elements with gradients, kind of 3D effects, shadows and so on. The currently used approach - which I really don't like very much - is to use the bitmaps from the graphic design as Backgrounds of various widgets. This has some very nasty drawbacks according to the placement of

Custom Qt Widgets with python for Qt Designer

怎甘沉沦 提交于 2019-12-04 09:31:16
问题 I am trying to write a custom widget for the Qt Designer using only Python. I was following a couple of tutorials I found online but none of them were working or anything close to what I would call to be a minimum working example. So my questions are: What steps are involved to make a a custom widget appear in the Widget Box of Qt Designer? If you can spare the time: Please provide a minimum working example (like a widget with a label in it saying "A truly minimal working Qt custom widget

Design Application with Qt

 ̄綄美尐妖づ 提交于 2019-12-03 14:59:52
I have to implement a graphical user interface design. The framework of choice is Qt. After some work on the implementation a few difficulties and questions turned out. The main point is that there are some fancy design elements with gradients, kind of 3D effects, shadows and so on. The currently used approach - which I really don't like very much - is to use the bitmaps from the graphic design as Backgrounds of various widgets. This has some very nasty drawbacks according to the placement of the elements and to scalability. This approach generates a fairly static user interface, that is

Custom Qt Widgets with python for Qt Designer

巧了我就是萌 提交于 2019-12-03 04:04:11
I am trying to write a custom widget for the Qt Designer using only Python. I was following a couple of tutorials I found online but none of them were working or anything close to what I would call to be a minimum working example. So my questions are: What steps are involved to make a a custom widget appear in the Widget Box of Qt Designer? If you can spare the time: Please provide a minimum working example (like a widget with a label in it saying "A truly minimal working Qt custom widget example"). Or is it maybe not possible at all to include a custom widget using only python? swdev I found

Extending from GtkBin

放肆的年华 提交于 2019-12-01 10:47:48
问题 I'm trying to make a custom widget that resembles the "quick search" entry that Gtk uses on all TreeView-like widgets. Here's a simplified example of my initial idea: from gi.repository import Gtk class QuickSearch(Gtk.Bin): def __init__(self, *args, **kwargs): super(QuickSearch, self).__init__(*args, **kwargs) self.add(Gtk.Entry()) win = Gtk.Window() win.connect("delete-event", Gtk.main_quit) search = QuickSearch() win.add(search) win.show_all() Gtk.main() The problems are the following: If