![]() |
#1 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Calibre UI Development - QT Designer
Is anyone doing Calibre UI development on Windows? I'd like to be able to use QT Designer to open and modify the something.ui files. Up until now, I've manually modified them to get what I want, but that's getting old.
Is QT Designer self contained, or should I install Python first? |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,190
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
qt designer doesn't need python. Just install it from the nokia website. I belive Charles uses Qt Designer on windows with calibre.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
ZCD BombShel
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,793
Karma: 8293322
Join Date: Jan 2009
Location: The Frozen North (aka Illinois, USA)
Device: iPad, STB Kindle Oasis
|
*sigh*....Well, I have it, and yes I can open the .UI files to modify, but that's about as far as I get with it. But since I already have Python installed; I couldn't tell you if you need it first.
|
![]() |
![]() |
![]() |
#4 |
ZCD BombShel
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,793
Karma: 8293322
Join Date: Jan 2009
Location: The Frozen North (aka Illinois, USA)
Device: iPad, STB Kindle Oasis
|
LOL ok, Kovid, we cross posted. I would LOVE to work on this, but I can't seem to figure out enough about Qt Designer to even add a Qt Toolbar. I know Qt Designer tutorials aren't your job, Kovid, which is why I haven't said anything.
|
![]() |
![]() |
![]() |
#5 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,190
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Here's the Qt Designer manual: http://doc.trolltech.com/4.6/designer-manual.html
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
ZCD BombShel
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,793
Karma: 8293322
Join Date: Jan 2009
Location: The Frozen North (aka Illinois, USA)
Device: iPad, STB Kindle Oasis
|
Yeah, I have that....
|
![]() |
![]() |
![]() |
#7 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,336
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
@starson17 & @phenomshel,
I use QT Designer with calibre. It doesn't need python in the sense that it reads and writes .ui files, and doesn't touch any python files. That said, there are issues. One: there are a lot of calibre .ui files that QT Designer will destroy. I always make a copy, open the .ui, then save it, just to see what happens. More times than I care for, the .ui file is rendered useless. Problems range from icon path names changed, custom class lists removed, and text changed to rich (html) text. Two: I haven't figured out how to make QT designer put layouts directly into outermost-level widgets. It insists on putting a frame in, which destroys resizing. I have to manually edit these out of the .ui file. Once I do that, things are OK. Three: it doesn't work well with spanned columns and rows in grid layouts. I use it first to get a rough shell for a dialog. I next edit the ui file to get rid of the extra frames and the like, so that the top-level layout (usually a grid) is a direct child of the widget. Now I can drop controls and the like into the dialog. Last thing I do is manually edit the spanning. I do like the ease in which I can drop horizontal and vertical box layouts into grids, making placement of controls reasonably convenient. I sometimes have issues with class references, but I think that is from my own ignorance. In particular, I have trouble with custom widgets. I would love a tool that would properly indent an existing .ui file. Does someone know of such a thing? |
![]() |
![]() |
![]() |
#8 | ||||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
Quote:
Quote:
Quote:
Thanks to all for the comments. @Kovid- phenomshel has asked me about the location of the main gui .ui file. In a 6.5x version, I'd edited a file called gui2/main.ui to add an icon button on the main toolbar, but that file seems to have disappeared? ![]() Is it no longer used? |
||||
![]() |
![]() |
![]() |
#9 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,190
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
the main gui is now completely dynamic (multiple layouts, customizable actions etc.) which means a .ui based design is no longer suitable. It is now implemented in the code. (relevant files are gui2/layout.py and gui2/init.py and gui2/ui.py)
|
![]() |
![]() |
![]() |
#10 |
ZCD BombShel
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,793
Karma: 8293322
Join Date: Jan 2009
Location: The Frozen North (aka Illinois, USA)
Device: iPad, STB Kindle Oasis
|
Thanks for the answer, Kovid
![]() ![]() |
![]() |
![]() |
![]() |
#11 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,336
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
I should say that in a measurable percentage of cases, I don't bother with the designer. I build the dialog in code. For example, the new check_library is done that way. My reason: it is more of a bother to build the .ui file and then interface to it than it is to build the dialog directly. More examples: the custom column tabs in metadata edit are also built by code, because they depend on the DB and can't be known in advance. The test fields in search/replace are built by code.
On the other hand, the plugboard UI and the various 'manage X' dialogs were done with designer. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Suggestions for Calibre development | scottklarr | Calibre | 4 | 06-22-2010 12:03 PM |
Calibre development | macellan | Calibre | 3 | 05-21-2010 06:36 PM |
calibre VMWare development environment | kovidgoyal | Calibre | 30 | 12-30-2009 12:43 PM |
calibre Portable 0.6.23 Development Test 1 | Dopedangel | Calibre | 5 | 11-30-2009 10:29 AM |
Calibre Windows Development | ilovejedd | Calibre | 9 | 07-12-2009 11:09 PM |