Glossy buttons in wxPython? - button

alt text http://imgkk.com/i/Fmtd8B.jpg
This is how they look in vista. They are glossier than the normal buttons and when the mouse is not over them they are flat. They have a correspondent version on Windows XP. Is there a way to get them using wxPython?

You can always make a custom button which can look same or better
see my answer to your other question
Custom Button

Get the wxpython docs package from http://www.wxpython.org/download.php
and check out the examples.
Andrea Gavana's agw library, which is included with wxpython now, has a couple of custom widgets called AquaButton and Gradient button both which look very nice. These may work or you may be able to adapt them to suit, they're pure python so you shouldn't have hard time modifying them.

Related

Intellisense window using PYQT4

Hi I am trying to learn pyqt by writing my own texteditor, using pyQT one of the things i want to have is intellisense/word suggestions. i.e so that as you type in the text editor it offers you suggestions of words that would be suitable. I have a list of words, and i can already generate a list of suggestions. My difficulty is presenting it, I am unable to bring up a window/dialog at the cursor location which shows a list of possible words. So far I have succesfully got QMenu to work, but it is limited as in it has no scrollbars and can only display a limited number of suggestions.
I tried QListWidget, but this displayed a popup window(complete with max,min buttons) this just isn't right, though it did allow me to have scrollbars.
I would like to know what object I should use to display suggestions to a user at the cursor location just like one sees in any good IDE. This is what I am trying to do
After doing some searching, I found that I was thinking about it all wrong.QListview is not what I needed
Scintilla is great, and probably the most appropriate. Thank you rainer
There is a wonderful example in
Sample using QScintilla with PyQt
But that is not all that I found. There is a class QCompleter, which is also quite good, as I can use it with a QTextedit, after a good amount of searching I found. "A text-edit which would help enter long words"
QTextEdit with autocompletion using pyqt
Plenty of documentation in
QCompleter Class Reference

How do I use my own custom buttons and design with wxpython

I've been looking for some inspiration with wxpython as far as the GUI goes. Everything in the demo looks boring and uninspiring so I want to go in my own direction but I can't figure out how to use my own buttons I made in photoshop or my own background images.
I'm kind of new to GUI programming so I ask if you could please be clear in what steps I should take. Once I intialize the frame...how to I load my custom buttons, or set the panel background?
As acattle pointed out, I already wrote on how to change a panel's background. You should note that wxPython isn't a themable GUI toolkit. It uses the native widgets of the OS wherever possible and most of the time, those just aren't very themable. If you need that, then you should look at Tkinter's (especially ttk) or pyside/pyQt.
If you need bitmap buttons, there are several options:
BitmapButton
GradientButton
AquaButton
PlateButton
I did some googling and I found this tutorial for setting the background of panels.
A bit more googling and I found this post talking about wxPython's Bitmap Button Class and showing some code examples.
I would suggest being very very careful designing your GUI if you're going to use custom images. You need to pay special attention to your spacing and your text sizes or your GUI might come out looking like crap.

How to use custom widget in Qt-Designer

I want to use a custom widget in the GUI-Designer of Qt-Creator IDE.
So i created a class which inherits from Qt's QWidget. It worked to place
it on a QMainWindow programaticaly, but have to do my work in the desiger
where it does not appear as an option in the kist of components.
I googled to find a solution for problem an found an manual on, who guesses, the
Qt doc page ( https://doc.qt.io/archives/qt-4.7/designer-creating-custom-widgets.html
and https://doc.qt.io/archives/qt-4.7/designer-creating-custom-widgets.html).
I tried to follow it but doesn't work.
Does someone know an other way to do this or can give a hint where i can search
for problems following this tutorial?
Thanks in advance.
Codierknecht
There is a different example in the examples section of the Qt documentation that I think is a lot clearer.
Custom Widget Plugin Example
It was a little unclear to me when reading the tutorial where the Q_EXPORT_PLUGIN2() macro goes, but having full example code and project alleviates that.
If you are like me, the analog clock example didn't do it for you, in which case I found just one better tutorial. It may be on the kde site but I you dont need kde to do it, it just explains how to make the custom widget a plugin so you can add it into Qt Designer, rather than having to code it in, which is the norm when you just add a widget to your project and customize the class. I hope this page helps you like it helped me, get in the right direction of writing a single Qt Designer (or multiple) plugin:
Writing Qt Designer Plugins
If this link ever becomes dead, just do a search for the link itself, usually that will turn up the original page in someone's cache, as they do in the other examples above (the dead links in the above answers that just take you to main area and not to the pages originally intended).

Change icon of Alert buttons

How do I change the icons to Alert buttons like OK, CANCEL etc?
If you look at the source code for Alert there really isn't a lot there once you get past the comments and properties. What I've done in the past is to just copy the Alert class and modify my custom version however I see fit. That way you don't have to deal with the mx_internal stuff. If you are using Flex 4, there is no spark version of Alert, so another thing you can do is create your own spark version, which will give you even more control over skinning your alerts using skins etc. Sounds like a big deal, but it's actually much easier than you'd think (speaking from experience here.)
Just specify the iconClass paremeter of the Alert class. A detailed example can be found here.
You can find a complete source code and application example here

Does Qt support ribbon control?

Does Qt support ribbon control?
I want to share with you the link to site has published screenshots of their component Qtitan Ribbon for Qt.
http://www.devmachines.com/qtitanribbon-overview.html
While there is no dedicated Ribbon widget in Qt, you can fashion something similar yourself. You could take a QTabWidget and put some buttons inside (and optionally style it to look a bit more like Microsoft's Ribbon). Depending on what you're trying to accomplish, that might suffice.
One of their sample apps apparently has a ribbon, so it should be do-able.
http://qt.nokia.com/images/products/vtk-designer-opengl-screenshot
You can take any JavaScript/JQuery ribbon, insert it into QWebView and do whatever you want with it, using the Qt Webkit Bridge.
There is no Qt ribbon control.
I believe there are license issues preventing Nokia from developing a ribbon control that is similar to Microsofts.
There are free alternatives to QtitanRibbon by now, for example, checkout:
https://github.com/martijnkoopman/Qt-Ribbon-Widget
You can even directly use it in any *.ui file!
Simply add a QTabWidget in QtDesigner and then promote that widget to the Ribbon class.
No, it doesn't. I didn't find out any plan to support it in the future.
We use QtitanRibbon, and it works very well for us. Support has been good, documentation on the short side. Worth noting that it not only provides a ribbon UI, it also makes it convenient to implement dark mode (or in our case, we opted for grey mode).

Resources