Search Results

Search found 2964 results on 119 pages for 'qt stylesheet'.

Page 35/119 | < Previous Page | 31 32 33 34 35 36 37 38 39 40 41 42  | Next Page >

  • Normal C++ code in Qt doesnt build and run

    - by Nick
    Hello. I am using Qt under linux, if it matters. I ran successfully under Geany (a simple c++ compiler) the following: //my first program in C++ Hello World! include using namespace std; int main () {cout << "Hello World!"; return 0;} I opened Qt source file and copied the exact same code and i can't build or run. Thank you for your responses to this simple problem.

    Read the article

  • Problem with Tapestry palette's arrow icons in IE8

    - by JellyHead
    I'm using Tapestry to create pages for a web app, and have been using the palette component to add/delete items to/from a group. The page looks great in Firefox (Tapestry seems biased towards Firefox), but my customers will all be using Internet Explorer (any versions from 6, 7, & 8) and in IE8, the disabled arrow buttons look awful. In Firefox, they are faded, using an opacity setting of 25%, but this doesn't work in IE8 and instead you get a faded image with an ugly black border around the image. In tapestry-core's stylesheet (default.css), you have the following for a disabled arrow button. DIV.t-palette-controls BUTTON[disabled] IMG { filter: alpha(opacity = 25); -moz-opacity: .25; } These are clearly out of date, as -moz-opacity is no longer supported by Firefox (use opacity: 25 instead). The problem is with filter: "alpha(opacity = 25);". If I remove this, the arrows look fine in IE8, but they are not faded. I got the magic instruction: -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(opacity=25)"; from various websites, but putting this in does not work either - the arrow icons are ugly again. The icon itself (distributed with Tapestry) just seems to be a regular PNG, but I'm not an expert on image formats, so maybe there's a problem there? Anyone else had this problem?

    Read the article

  • XSL Template - reducing replication

    - by Chris
    Hey Sorry about the extremely vague question title (any suggestions for improvements welcome) I have an XSL document that, currently, has lots of replication that I want to reduce. Here is the following XML snippet I am working with <Unit Status="alive"> I am currently using the following XSL to show images based on the status of the Unit <xsl:choose> <xsl:when test="@Status = 'alive'"> <img src="/web/resources/graphics/accept.png" /> </xsl:when> <xsl:when test="@Status = 'missingUnit'"> <img src="/web/resources/graphics/error.png" /> </xsl:when> <xsl:when test="@Status = 'missingNode'"> <img src="/web/resources/graphics/exclamation.png" /> </xsl:when> <xsl:when test="@Status = 'unexpectedUnit'"> <img src="/web/resources/graphics/exclamation_blue.png" /> </xsl:when> <xsl:otherwise> <!-- Should never get here --> <img src="/web/resources/graphics/delete.png" /> </xsl:otherwise> </xsl:choose> How do I put this code in a template or stylesheet that will allow me to stop copying / pasting this everywhere. Thanks

    Read the article

  • What's the best way to only output a tag if it exists in XSL?

    - by Morinar
    I'm working on an interface with a 3rd party app that basically needs to take XML that was spat out by the app and convert it into XML our system can deal with. It's basically just applying a stylesheet to the original XML to make it looks like "our" XML. I've noticed that in other stylesheets we have, there are constructs like this: <xsl:for-each select="State"> <StateAbbreviation> <xsl:value-of select="."/> </StateAbbreviation> </xsl:for-each> Basically, the "in" XML has a State tag that I need to output as our recognized StateAbbreviation tag. However, I want to ONLY output the StateAbbreviation tag if the "in" XML contains the State tag. The block above accomplishes this just fine, but is not very intuitive (at least it wasn't to me), as every time I see a for-each I assume there is more than one, whereas in these cases there is 0 or 1. My question: is that a standard-ish construct? If not, is there a more preferred way to do it? I could obviously check the string length (which is also being done in other stylesheets), but would like to do it the same, "best" way everywhere (assuming of course that a "best" way exists. Advice? Suggestions?

    Read the article

  • How can I build value for "for-each" expression in XSLT with help of parameter

    - by Artic
    I need to navigate through this xml tree. <publication> <corporate> <contentItem> <metadata>meta</metadata> <content>html</content> </contentItem> <contentItem > <metadata>meta1</metadata> <content>html1</content> </contentItem> </corporate> <eurasia-and-africa> ... </eurasia-and-africa> <europe> ... </europe> </publication> and convert it to html with this stylesheet <ul> <xsl:variable name="itemsNode" select="concat('publicationManifest/',$group,'/contentItem')"></xsl:variable> <xsl:for-each select="$itemsNode"> <li> <xsl:value-of select="content"/> </li> </xsl:for-each> </ul> $group is a parameter with name of group for example "corporate". I have an error with compilation of this stylsheet. SystemID: D:\1\contentsTransform.xslt Engine name: Saxon6.5.5 Severity: error Description: The value is not a node-set Start location: 18:0 What the matter?

    Read the article

  • Program exit code -SomeNumber

    - by JohnnyLongPants
    i made a program using Qt for Symbian, its all working very well ... However, it always exits with a status code -10737something when i close the program i think the problem is in the deconstructer, maybe some memory leaks ... any suggestion on how to solve this problem, or to find the error using Qt Creator? thanks

    Read the article

  • QListView how to add column ?

    - by Samir
    How can I add columns to QListView control. Found a method addColumn while seardhing, but in my Qt Creator 1.2.1 based on Qt 4.5.2(32 bit) QListView doesn't have such method at all !!! So how would I add columns ? Say I have 3 columns then what is the code to add a row ?

    Read the article

  • Container item implementation

    - by onurozcelik
    Hi, I am working in Train Traffic Controller software project. My responsibility in this project is to develop the visual railroad GUI. We are implementing the project with Qt. By now I am using QGraphicsLinearLayout to hold my items. I am using the layout because I do not want to calculate coordinates of each item. So far I wrote item classes to add the layout. For instance SwitchItem class symbolizes railroad switch in real world. Each item class is responsible for its own painting and events. So far so good. Now I need a composite item that can contain two or more item. This class is going to be responsible for painting the items contained in it. I need this class because I have to put two or more items inside same layout cell. If I don' t put them in same cell I can' t use layout. See the image below. BlockSegmentItem and SignalItem inside same cell. Here is my compositeitem implementation. #include "compositeitem.h" CompositeItem::CompositeItem(QString id,QList<FieldItem *> _children) { children = _children; } CompositeItem::~CompositeItem() { } QRectF CompositeItem::boundingRect() const { FieldItem *child; QRectF rect(0,0,0,0); foreach(child,children) { rect = rect.united(child->boundingRect()); } return rect; } void CompositeItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget ) { FieldItem *child; foreach(child,children) { child->paint(painter,option,widget); } } QSizeF CompositeItem::sizeHint(Qt::SizeHint which, const QSizeF &constraint) const { QSizeF itsSize(0,0); FieldItem *child; foreach(child,children) { // if its size empty set first child size to itsSize if(itsSize.isEmpty()) itsSize = child->sizeHint(Qt::PreferredSize); else { QSizeF childSize = child->sizeHint(Qt::PreferredSize); if(itsSize.width() < childSize.width()) itsSize.setWidth(childSize.width()); itsSize.setHeight(itsSize.height() + childSize.height()); } } return itsSize; } void CompositeItem::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) { qDebug()<<"Test"; } This code works good with painting but when it comes to item events it is problematic. QGraphicsScene treats the composite item like a single item which is right for layout but not for events. Because each item has its own event implementation.(e.g. SignalItem has its special context menu event.) I have to handle item events seperately. Also I need a composite item implementation for the layout. How can I overcome this dilemma?

    Read the article

  • win32:libs undefined reference

    - by hector
    I want to link a .lib in my Qt project and I get an error about an undefined reference to vhtIOConn::getDefault(vhtIOConn::DeviceType). I have already added the following specifications to the .pro file: ###################################################################### # Automatically generated by qmake (2.01a) vie 28. ago 12:48:10 2009 ###################################################################### TARGET = DEPENDPATH += . INCLUDEPATH += . LIBS += "C:\agregar\VirtualHandCore.lib" LIBS += "C:\agregar\VirtualHandDevice.lib" LIBS += "C:\agregar\VirtualHandRegistry.lib" # Input HEADERS += "C:/Documents and Settings/halvarado/Mis documentos/respaldos de Qt/Development/include/vhandtk/vhtBase.h" SOURCES += main.cpp What should I do?

    Read the article

  • How to compile a C project with more than one main function?

    - by Daziplqa
    Hi folks, I am new to C, and now read some textbook and going to apply its examples. The problem is, whenever I creates a new project and try to put more than one file that contains a main function, the linker (as I thougt0 explains saying: /home/mohammed/tmp/abcd/main.c:4: multiple definition of `main' (BTW, I used many IDEs, MonoDevelop, QT creator, VS2010, Codebloks, ...) I am currently uses QT Creator, It seems to be a very nice IDE. So, there's not a workaround to solve such problem??

    Read the article

  • how to change headers data

    - by Moayyad Yaghi
    hello i have the following class class AssetTableModel(QtCore.QAbstractTableModel): def init(self,filename=''): super(AssetTableModel,self).init() self.fileName=filename self.dirty = False self.assets = [] self.setHeaderData(0,QtCore.Qt.Horizontal,QtCore.QVariant('moayyad'),QtCore.Qt.EditRole) and i need to change the headers of the columns or the rows ,i used ( self.setHeaderdata()) but its not working ,i have a table that consistes of 2 columns and 2 rows only. is there any other function that changes headers ??. please help thanx in adnvance

    Read the article

  • capybara-webkit 0.8.0 installation error

    - by Marat
    I cannot install capybara-webkit 0.8.0. I installed QT and added C:\Qt\4.7.4\bin\ to my PATH. And anyway I'm getting this error: ERROR: Error installing capybara-webkit: ERROR: Failed to build gem native extension. C:/Ruby193/bin/ruby.exe extconf.rb Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/capybara- webkit-0.8.0 for inspection. Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/gems/capybara-webkit-0.8.0/./ge m_make.out

    Read the article

  • Passing enums to functions in C++

    - by rocknroll
    Hi all, I have a header file with all the enums listed (#ifndef #define #endif construct has been used to avoid multiple inclusion of the file) that I use in multiple cpp files in my application.One of the enums in the files is enum StatusSubsystem {ENABLED,INCORRECT_FRAME,INVALID_DATA,DISABLED}; There are functions in the application delcared as ShowStatus(const StatusSubsystem&); Earlier in the application when I made calls to the above function like ShowStatus(INCORRECT_FRAME); my application used to compile perfectly. But after some code was added The compilation halts giving the following error: File.cpp:71: error: invalid conversion from `int' to `StatusSubsystem' File.cpp:71: error: initializing argument 1 of `void Class::ShowStatus(const StatusSubsystem&) I checked the code for any conflicting enums in the new code and it looked fine. My Question is what is wrong with the function call that compiler shows as erroneous? For your reference the function definition is: void Class::ShowStatus(const StatusSubsystem& eStatus) { QPalette palette; mStatus=eStatus;//store current Communication status of system if(eStatus==DISABLED) { //select red color for label, if it is to be shown disabled palette.setColor(QPalette::Window,QColor(Qt::red)); mLabel->setText("SYSTEM"); } else if(eStatus==ENABLED) { //select green color for label,if it is to be shown enabled palette.setColor(QPalette::Window,QColor(Qt::green)); mLabel->setText("SYSTEM"); } else if(eStatus==INCORRECT_FRAME) { //select yellow color for label,to show that it is sending incorrect frames palette.setColor(QPalette::Window,QColor(Qt::yellow)); mLabel->setText("SYSTEM(I)"); } //Set the color on the Label mLabel->setPalette(palette); } A strange side effect of this situation is it compiles when I cast all the calls to ShowStatus() as ShowStatus((StatusSubsystem)INCORRECT_FRAME); Though this removes any compilation error, but a strange thing happens. Though I make call to INCORRECT_FRAME above but in function definition it matches with ENABLED. How on earth is that possible? Its like while passing INCORRECT_FRAME by reference, it magically converts to ENABLED, which should be impossible. This is driving me nuts. Can you find any flaw in what I am doing? or is it something else? The application is made using C++,Qt-4.2.1 on RHEL4. Thanks.

    Read the article

  • I want to make my desktop application available online - how?

    - by Ami
    I have a few years experience programming c++ and a little less then that using Qt. I built a data mining software using Qt and I want to make it available online. Unfortunately, I know close to nothing about web programming. Firstly, how easy or hard is this to do and what is the best way to go about it? Supposing I am looking to hire someone to make me a secure, long-term, extensible, website for an online software service, what skill set should I be looking for?

    Read the article

  • De QObject aux méta-objets, une plongée au coeur des fondations de Qt, tutoriel de Louis du Verdier

    Bonjour à tous, Les fondations de Qt constituent un sujet intéressant dans le cadre de son apprentissage. Sur quoi s'appuie réellement le framework ? Quel est son modèle objet ? Dans la majorité des cas, les développeurs utilisant Qt pour développer des interfaces graphiques ne savent pas y répondre, et c'est pour cela que j'ai décidé de rédiger un article sur ces fondations. Cet article a pour but de traiter de QObject jusqu'aux méta-objets pour permettre à tous de mieux comprendre sur quoi est véritablement fondé Qt. L'introspection, les propriétés, les signaux, les slots et les méta-objets constituent pour vous un domaine inexploré ? L'occasion est venue d'y remédier.

    Read the article

  • Qt : le Directeur de l'écosystème tente de rassurer la communauté après le choix de Windows Phone par Nokia

    Qt : le Directeur de l'écosystème tente de rassurer la communauté Après la décision de Nokia de choisir Windows Phone pour ses futurs smartphones « Qt ne sera pas porté sur Windows Phone 7 ». La réponse d'un développeur de Nokia à la question posée sur le blog officiel du framework est claire et sans appel. Dès lors, se pose la question de l'avenir de la technologie. Un avenir qui semble s'assombrir avec la décision de Nokia de choisir Windows Phone 7 comme plateforme de référence pour ses futurs smartphones. Daniel Kihlberg, Directeur de l'écosystème Qt, ...

    Read the article

  • Build automation: Is it usual to use QMake for non-Qt projects?

    - by Raphael
    So, I'm planning to write a C++ library and I want it to be cross-platform, and as this library won't deal with UI and I want it to have as little dependencies as possible, I won't be using Qt (actually Qt won't really help me to achieve what I want, all I plan on using is STL and Boost). Now when it comes to build a cross-platform project, I really like QMake as it's extremely easy to use and I have experience with it. I also heard good things about CMake, though I really doubt it's as easy to use as QMake. Anyway, here is my question: Should I stick with build automation tool that I know or is QMake just out of context for a non-Qt project? Should I take this as an opportunity to learn CMake? Or is there a better alternative to these two?

    Read the article

  • Any patent issue if I want to call my classes "signal/slot" as in Qt?

    - by user129506
    I need to code a signal-like mechanism and I was thinking of using the same "slot" and "signal" terms to indicate the signal and the function that needs to be called. Since this is a commercial application I'd like to know if there might be any issue with using these names, e.g. if Qt has some sort of patent on them (I searched around but couldn't find it). I believe this is a stupid question since patenting a class name would be moronic, to say the least.. but anyway... To add some detail: my code is ENTIRELY different and has NOTHING TO DO with Qt except the above. I don't use moc or any Qt class.

    Read the article

  • Premier jour de Qt chez Digia, après son rachat de Nokia : le framework restera disponible sous GPL et LGPL

    Il y a une quinzaine de mois, Nokia « refilait » le support commercial de Qt à Digia ; certaines rumeurs parlaient déjà d'une revente complète de tout ce qui concerne le framework, il ne s'agissait que du support commercial ? à l'époque. Ces rumeurs se révèlent maintenant confirmées : Digia s'apprête à acquérir tout ce qui concerne Qt de Nokia (toutes les activités Qt, dont le développement du produit, les licences open source et commerciales, tout le service commercial). Ceci intervient dans une période relativement sombre pour Nokia (« Nokia coule-t-il à pic ? »), avec parfois des décisions douloureuses et, selon certains, injustifiables (pour se relan...

    Read the article

  • QGraphicsView scrolling and image scaling/cropping

    - by boohoo
    I would like to have a background image in my QGraphicsView that is always scaled (and cropped if necessary) to the size of the viewport, without scrollbars and without scrolling with the keyboard and mouse. The example below is what I am doing to scale and crop an image in the viewport, but I am using random values for the cropping that are pulled out of the aether. I would like a logical solution? MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); scene = new QGraphicsScene(this); ui->graphicsView->resize(800, 427); // MainWindow is 800x480, GraphicsView is 800x427. I want an image that // is the size of the graphicsView. ui->graphicsView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); ui->graphicsView->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); // the graphicsView still scrolls if the image is too large, but // displays no scrollbars. I would like it not to scroll (I want to // add a scrolling widget into the QGraphicsScene later, on top of // the background image.) QPixmap *backgroundPixmap = new QPixmap(":/Valentino_Bar_Prague.jpg"); QPixmap sized = backgroundPixmap->scaled( QSize(ui->graphicsView->width(), ui->graphicsView->height()), Qt::KeepAspectRatioByExpanding); // This scales the image too tall QImage sizedImage = QImage(sized.toImage()); QImage sizedCroppedImage = QImage(sizedImage.copy(0,0, (ui->graphicsView->width() - 1.5), (ui->graphicsView->height() + 19))); // so I try to crop using copy(), and I have to use these values // and I am unsure why. QGraphicsPixmapItem *sizedBackground = scene->addPixmap( QPixmap::fromImage(sizedCroppedImage)); sizedBackground->setZValue(1); ui->graphicsView->setScene(this->scene); } I would like to know a way to scale and crop an image to the size of the QGraphicsView that will work even when I resize the QGraphicsView. Where are the 1.5 and 19 coming from?

    Read the article

  • QFileDialog filter from mime-types

    - by Mathias
    I want the filter in a QFileDialog to match all audio file types supported by Phonon on the platform in question. 1 - However I am not able to find a way in Qt to use mime types in a filter. How can I do that? 2 - Or how can I find the corresponding file extensions for the mimetypes manually? The solution should be Qt based, or at least be cross platform and supported everywhere Qt is. Following is a short code describing my problem: #include <QApplication> #include <QFileDialog> #include <QStringList> #include <phonon/backendcapabilities.h> QString mime_to_ext(QString mime) { // WHAT TO REALLY DO ?? // NEEDLESS TO SAY; THIS IS WRONG... return mime.split("/").back().split('-').back(); } int main(int argc, char **argv) { QApplication app(argc, argv); QStringList p_audio_exts; QStringList p_mime_types = Phonon::BackendCapabilities::availableMimeTypes(); for(QStringList::iterator i = p_mime_types.begin(), ie = p_mime_types.end(); i != ie; i++) { if((*i).startsWith("audio")) p_audio_exts << mime_to_ext(*i); } QString filter = QString("All Files(*)"); if(!p_audio_exts.isEmpty()) { QString p_audio_filter = QString("Audio Files (*.%1)").arg(p_audio_exts.join(" *.")); filter = QString("%1;;%2").arg(p_audio_filter).arg(filter); } QFileDialog dialog(NULL, "Open Audio File", QString::null, filter); dialog.exec(); }

    Read the article

< Previous Page | 31 32 33 34 35 36 37 38 39 40 41 42  | Next Page >