Does anyone have an example of how to do this? When I try to make a
class that subclasses from a QFilePreview class and a QWidget class, I
get the following error:
TypeError: Cannot sub-class from more than one wrapped class 1 1534
Christopher Stone wrote: Does anyone have an example of how to do this? When I try to make a class that subclasses from a QFilePreview class and a QWidget class, I get the following error:
TypeError: Cannot sub-class from more than one wrapped class
I haven't tried it, but looking at the Qt source code, it appears that you
only really need to subclass QFilePreview and provide a previewUrl method.
I'd try that.
The setInfoPreview and setContentPrevi ew methods both take (QWidget*,
QFilePreview*) and the associated comments say to provide the same pointer
for both arguments if your subclass inherits both, which seems to imply you
could just inherit QFilePreview and construct the QWidget somewhere else.
I didn't notice any place else in qfiledialog.cpp where multiple inheritance
is really required for QFilePreview. Then again, it was a pretty quick look
at the C++ code.
PyQt doesn't allow multiple inheritance of Qt classes in creating a new
Python class.
There are other possible solutions, but the above is what I'd try first.
You might also get more info from the PyKDE mailing list at Py***@mats.imk. fraunhofer.de. You can sign up at: http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
Jim This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Vamsi Mudrageda |
last post by:
I am kind of new to Python, and after trying and using wxPython, I found
it kind of lacking in easy-to-read documentation, speed at loading, and
GUI response-time.
So I am looking for an another GUI toolkit that is cross-platform for
Python, and am leaning toward PyQt (PyGTK is kind of dull looking in
comparison). Unfortunately, although TrollTech says Qt is
cross-platform, its license strategy has me a bit confused. So here is
to...
|
by: simo |
last post by:
OK, so I'm at the stage where I want to make a choice between wxPython
and PyQt.
Currently I'm using wxPython mainly due to the fact that it has GPL
Linux and Windows versions.
I prefer Qt to wxWindows, but am confused with all the Windows
licensing issues.
For the moment this is just for my own tinkering and utility apps, but
|
by: Sibylle Koczian |
last post by:
Still trying to learn PyQt from a book about several Python GUI
toolkits, I seem to learn first what doesn't work. The following small
script seems to work, but after closing the window I get the error
message "Fatal Python error: PyEval_RestoreThread: NULL tstate".
Without the line "self.app = app" the error goes away. So I suppose the
main window can't have a reference to the application class. Right?
Using the global variable qApp...
|
by: Chump Wad |
last post by:
I will now die. I am too ignorant to make it work.
10.2.setEventCB.py segfaults for me.
It is almost there, but it is not there. SoQt.init returns a string,
which I can't use as the parent widget of my PyQt derived class.
SoQt.show and mainLoop need a string as a parameter, so my PyQt derived
class can't go there.
|
by: svenn.are |
last post by:
Hi,
I wanted to run a program that is written in PyQt on my mac, and went
over to Riverbank to get PyQ 3.13 and SIP 4.1.1 sources.
I followed the installation guide except for the compiling python as
Macosx already has python.
I had no problem with compiling SIP and also no problem with compiling
PyQt nor did I have any error message during make install.
| |
by: Simon John |
last post by:
After quite a while of wxPython I'm getting back into PyQt, mainly due
to the announcement by Trolltech that they will make a GPL version of
Qt4 for Windows (and Phil-T said he will make a PyQt to go with it
eventually!)
I'm currently using PyQt 3.12 that comes with the BlackAdder demo, it
seems to work fine with Python 2.3.5 except that it doesn't support the
WinXP look'n'feel, the QStyle "WindowsXP" isn't included, and using a...
|
by: Phil Thompson |
last post by:
Riverbank Computing is pleased to announce the release of PyQt v3.14 available
from http://www.riverbankcomputing.co.uk/.
Changes since the last release include support for QScintilla v1.5.
PyQt is a comprehensive set of Qt bindings for the Python programming language
and supports the same platforms as Qt. Like Qt, PyQt is available under the
GPL (for UNIX, Linux and MacOS/X), a commercial license (for Windows, UNIX,
Linux and...
|
by: Phil Thompson |
last post by:
Riverbank Computing is pleased to announce the release of PyQt v4.0beta1
available from http://www.riverbankcomputing.co.uk/pyqt/.
PyQt is a comprehensive set of Qt bindings for the Python programming language
and supports the same platforms as Qt (Windows, Linux and MacOS/X). Like Qt,
PyQt is available under the GPL and a commercial license.
PyQt v4 supports Qt v4 (http://www.trolltech.com/products/qt/index.html).
PyQt v3 is still...
|
by: anders |
last post by:
I am writing a plugin for a piece of software in python, and I want to
start up a PyQt GUI in the plugin, without stalling the main thread
while the gui is running (later i will want to pass messages between
the main thread and the gui thread).
I'm new to pyqt, so I'm probably doing something very silly, but for
the moment I'm just trying to get the first pyqt tutorial example
running in a seperate thread:
----8<--------
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |