glade

hexagon buttons in GTK+

不羁的心 提交于 2019-11-30 22:57:42
I am trying to create a button in GTK+ that has the shape of a Hexagon. How can I do it without using CSS ? And more general, how can I create my button in any shape I want? Is it possible to do such things in Glade (User interface edior for GTK+)? rsm When I put my comment I was bluffing because I never did the circular button.. I just did an example of an Hexagonal button using my original idea.. I got surprised that it was simpler than I thought! ( and by the way, no, it is not possible to do it in glade! ) # sorry but the example is in Python! :/ from gi.repository import Gtk def hexagon

hexagon buttons in GTK+

时光总嘲笑我的痴心妄想 提交于 2019-11-30 17:34:01
问题 I am trying to create a button in GTK+ that has the shape of a Hexagon. How can I do it without using CSS ? And more general, how can I create my button in any shape I want? Is it possible to do such things in Glade (User interface edior for GTK+)? 回答1: When I put my comment I was bluffing because I never did the circular button.. I just did an example of an Hexagonal button using my original idea.. I got surprised that it was simpler than I thought! ( and by the way, no, it is not possible

How can I create a GUI on top of a Python APP so it can do either GUI or CLI?

末鹿安然 提交于 2019-11-30 10:35:46
I am trying to write an app in python to control a motor using serial. This all works in a CLI situation fine and is generally stable. but I was wondering how simple it was to add a GUI on top of this code base? I assume there will be more code, but is there a simple way of detecting something like GTK, so it only applied the code when GTK was present? Also, GUI creation in Python in general: is it best to keep as little GUI specifics out of the code and use something like GTK's XML based approach (using gtk.glade.XML() function)? Are there other GUI toolkits that have a similar approach to

Python Glade could not create GladeXML Object

可紊 提交于 2019-11-30 08:31:58
I've created a simple window GUI in Glade 3.6.7 and I am trying to import it into Python. Every time I try to do so I get the following error: (queryrelevanceevaluation.py:8804): libglade-WARNING **: Expected <glade-interface>. Got <interface>. (queryrelevanceevaluation.py:8804): libglade-WARNING **: did not finish in PARSER_FINISH state Traceback (most recent call last): File "queryrelevanceevaluation.py", line 17, in <module> app = QueryRelevanceEvaluationApp() File "queryrelevanceevaluation.py", line 10, in __init__ self.widgets = gtk.glade.XML(gladefile) RuntimeError: could not create

How can I create a GUI on top of a Python APP so it can do either GUI or CLI?

天涯浪子 提交于 2019-11-29 15:47:09
问题 I am trying to write an app in python to control a motor using serial. This all works in a CLI situation fine and is generally stable. but I was wondering how simple it was to add a GUI on top of this code base? I assume there will be more code, but is there a simple way of detecting something like GTK, so it only applied the code when GTK was present? Also, GUI creation in Python in general: is it best to keep as little GUI specifics out of the code and use something like GTK's XML based

RGtk2 - missing gladexmlnew

…衆ロ難τιáo~ 提交于 2019-11-29 11:59:48
I just installed the RGtk2 package on a new machine and gladexmlnew seems to be missing (i.e. I get a could not find function gladexmlnew error after loading the RGtk2 package). I have libglade , libglade2 and corresponding -devel packages installed. What am I missing? The help file doesn't seem to help. SOLUTION : I seem to have found the solution, so I am posting it here. Apparently libglade has been deprecated in favour of GTKBuilder and RGtk2 does not include it anymore. This page has some informations on how to migrate from libglade to GTKBuilder . Thanks for the follow-up. I have only

RGtk2 - missing gladexmlnew

好久不见. 提交于 2019-11-28 05:43:47
问题 I just installed the RGtk2 package on a new machine and gladexmlnew seems to be missing (i.e. I get a could not find function gladexmlnew error after loading the RGtk2 package). I have libglade , libglade2 and corresponding -devel packages installed. What am I missing? The help file doesn't seem to help. SOLUTION : I seem to have found the solution, so I am posting it here. Apparently libglade has been deprecated in favour of GTKBuilder and RGtk2 does not include it anymore. This page has

How to compile all resources into one executable file?

人盡茶涼 提交于 2019-11-27 19:20:33
问题 I've wrote GTK application with python. All graphical user interface is in glade file, and there are some images used. I wish to compile my application into EXEcutable file. For that I'm using PyInstaller compiler and UPX packer. I've done as manual says: python Configure.py python Makespec.py --onefile --windowed --upx /path/to/yourscript.py python Build.py /path/to/yourscript.spec PyInstaller works perfectly and create one exe file. But to make my application work correctly i have to copy

GtkDialog mapped without a transient parent

落爺英雄遲暮 提交于 2019-11-27 05:21:44
问题 I have a GUI built in Glade (3.18) which is called by a Python 3 program (using PyGObject). I get a lot of warnings when running the program (Fedora 21) that say: Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged. How can I fix this warning? I tried filling in the field Transient for: main_window in Glade for all the dialog windows, but the warnings still appear. 回答1: You fix this warning by giving the GtkDialog a parent to be modal to. The relevant functions are