Search Results

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

Page 44/119 | < Previous Page | 40 41 42 43 44 45 46 47 48 49 50 51  | Next Page >

  • QUiLoader and ignored dynamic properties

    - by Googie
    I'm loading the .ui file, where one of the widgets (QComboBox) has a dynamic property (http://qt-project.org/doc/qt-5/properties.html#dynamic-properties). The UI file looks like this: <?xml version="1.0" encoding="UTF-8"?> <ui version="4.0"> <class>PopulateScriptConfig</class> <widget class="QWidget" name="PopulateScriptConfig"> <property name="geometry"> <rect> <x>0</x> <y>0</y> <width>400</width> <height>300</height> </rect> </property> <property name="windowTitle"> <string>Form</string> </property> <layout class="QVBoxLayout" name="verticalLayout"> <item> <widget class="QGroupBox" name="langGroup"> <property name="title"> <string>Language</string> </property> <layout class="QVBoxLayout" name="verticalLayout_3"> <item> <widget class="QComboBox" name="langCombo"> <property name="ScriptingLangCombo" stdset="0"> <bool>true</bool> </property> </widget> </item> </layout> </widget> </item> <item> <widget class="QGroupBox" name="codeGroup"> <property name="title"> <string>Implementation</string> </property> <layout class="QVBoxLayout" name="verticalLayout_2"> <item> <widget class="QPlainTextEdit" name="codeEdit"/> </item> </layout> </widget> </item> </layout> </widget> <resources/> <connections/> </ui> The important part is: <widget class="QComboBox" name="langCombo"> <property name="ScriptingLangCombo" stdset="0"> <bool>true</bool> </property> </widget> I'm loading the file with QUiLoader::load(). Note, that I have extended the QUiLoader class, but only to access createWidget() method, where I can query each widget like this: QWidget* UiLoader::createWidget(const QString& className, QWidget* parent, const QString& name) { QWidget* w = QUiLoader::createWidget(className, parent, name); qDebug() << w->dynamicPropertyNames(); return w; } As a result I see empty list displayed, so it seems like the dynamic property is completly ignored. Any ideas? P.S. I've made sure that I load correct file. 3 times.

    Read the article

  • QListView/QListWidget with custom items

    - by Daniel
    I'm writing my first Qt application with PyQt and am having some trouble creating a custom list view. I'd like the list to contain arbitrary widgets (one custom widget in particular). How would I go about this? It seems that the alternative would be to create a table or grid view wrapped in a scrollbar. However, I'd like to be able to take advantage of the model/view approach as well as the nesting (tree-view) support the built-ins handle. EDIT: To clarify, this widget is interactive (contains buttons), so the solution requires more than painting a widget.

    Read the article

  • QtWebKit problems playing HTML5 video

    - by oskar
    I have a simple Qt application that launches a window with a QWebView. I tried several sites using the video tag with h.264, and it either can't play the video at all (as in youtube or sublime video), or it renders the video poorly, with black lines covering parts of it, like when viewing the video here. Is this a known issue with QtWebKit, or have I neglected to do something that would make it work better? My code is below. #include <QtGui/QApplication> #include <QWebView> int main(int argc, char *argv[]) { QApplication a(argc, argv); QWebView *view = new QWebView(); view->load(QUrl("http://webkit.org/blog/140/html5-media-support/")); view->show(); return a.exec(); }

    Read the article

  • Best UI development framework on windows?

    - by TG
    I have been developing UI in Win32/MFC, but developing cool UI in Win32/MFC is very difficult and time consuming. Please note, I always want my code to be platform independent, So I prefer programming back-end (Business logic) in C++. Which is the best framework for developing cool UI on windows platform? I heard of quite a few, like Qt, Flex, Delphi. What is your thoughts (Pros and Cons) on these UI development frameworks. Which one do you recommend ?

    Read the article

  • How to interact with checkbox actions ? (QTableView with QStandardItemModel)

    - by Claire Huang
    I'm using QTableView and QStandardItemModel to show some data. For each row, there is a column which has a check Box, this check box is inserted by setItem, the code is as follows: int rowNum; QStandardItemModel *tableModel; QStandardItem* __tmpItem = new QStandardItem(); __tmpItem->setCheckable(true); __tmpItem->setCheckState(Qt::Unchecked); tableModel->setItem(rowNum,0,__tmpItem); Now I want to interact with the check box. If a check box changes its state by user (from checked to unchecked or vice versa), I want to do something on the corresponding data row. I know I can use signal-slot to catch the change of checkbox, but since there are lots of data row, I don't want to connect each row one by one. Is there anyway to interact with the check action more effectively? Thanks :)

    Read the article

  • QTableWidget signal cellChanged(): distinguish between user input and change by routines

    - by crabman
    i am using PyQt but my question is a general Qt one: I have a QTableWidget that is set up by the function updateTable. It writes the data from DATASET to the table when it is called. Unfortunately this causes my QTableWidget to emit the signal cellChanged() for every cell. The signal cellChanged() is connected to a function on_tableWidget_cellChanged that reads the contents of the changed cell and writes it back to DATASET. This is necessary to allow the user to change the data manually. So everytime the table is updated, its contents are written back to DATASET. Is there a way to distinguish if the cell was changed by the user or by updateTable? i thought of disconnecting on_tableWidget_cellChanged by updateTable temporarily but that seems to be a little dirty.

    Read the article

  • Load NSImage into QPixmap or QImage

    - by Thomi
    I have an NSImage pointer from a platform SDK, and I need to load it into Qt's QImage class. To make things easier, I can create a QImage from a CGImageRef by using QPixmap as an intermediate format, like this: CGImageRef myImage = // ... get a CGImageRef somehow. QImage img = QPixmap::fromMacCGImageRef(myImage).toImage(); However, I cannot find a way to convert from an NSImage to a CGImageRef. Several other people have had the same problem, but I have yet to find a solution. There is the CGImageForProposedRect method, but I can't seem to get it to work. I'm currently trying this (img is my NSImage ptr): CGImageRef ir = [img CGImageFirProposedRect:0:0:0]; Any ideas?

    Read the article

  • QPainter::drawText bounding boxes for each character

    - by satuon
    I'm using QPainter to draw multiline text on QImage. However, I also need to display a colored rectangle around each character's bounding box. So I need to know the bounding box that each character had when being drawn. For example, for painter.drawText(QRect(100, 100, 200, 200), Qt::TextWordWrap, "line\nline2", &r); I would need to get 10 rectangles, taking into account newlines, word-wrap, tabs, etc. For example, the rectangle of the second 'l' would be below the rectangle of the first 'l', instead of being to the right of 'e', because of the newline.

    Read the article

  • QGraphicsView and eventFilter

    - by erelender
    Hello everyone, This has been bugging me for more than two days now, so i thought i should ask. I am using Qt 4.5.3 (compiled with VC2008) on Win7. I have MyGraphicsView (inherits QGraphicsView) and MyFilter (inherits QObject) classes. When i install the MyFilter object as an event filter to MyGraphicsView, Mouse events are delivered to MyFilter after they are delivered to MyGraphicsView whereas Key events are delivered to MyFilter before they are delivered to MyGraphicsView. In the second case, i install the MyFilter object as an event filter to MyGraphicsView-viewport() (which is a standart QGLWidget), Mouse events are delivered to MyFilter before they are delivered to MyGraphicsView, whereas Key events are delivered to only MyGraphicsView. The events are supposed to be delivered to event filters before they are delivered to the actual object, so why is this happening? What should i do to ensure this order? Thanks in advance. Best Regards.

    Read the article

  • GDB doesnt like my typedef

    - by yan bellavance
    It seems that the following is to deep for the debugger in Qt even though the program uses it without problem typedef QMap <int, QStringList> day2FileNameType; typedef QMap <int, day2FileNameType> month2day2FileNameType; typedef QMap <int, month2day2FileNameType> year2month2day2FileNameType; year2month2day2FileNameType y2m2d2f; now the first 2 typeDefs work okay with the debugger but the third one retrieving data for watch view (over 100 pending request) Is it wrong for me to try and use such a typedef as year2month2day2FileNameType?

    Read the article

  • LIbrary issue: How do I set up QtWebKit to parse HTML?

    - by user560106
    Nick Presta showed that you can parse HTML with qt here: Library Recommendation: C++ HTML Parser However, when I attempt to build this, I get an access violation on the "QWebFrame* frame = page.mainFrame();" line. What am I doing wrong? #include <QtWebKit\QWebElement> #include <QtWebKit\QWebView> #include <QtWebKit\QWebFrame> #include <QtWebKit\QWebPage> #include <iostream> int main() { QWebPage page; QWebFrame* frame = page.mainFrame(); frame->setHtml( "<html><head></head><body></body></html>" ); QWebElement document = frame->documentElement(); return 0; }

    Read the article

  • selected Rows/Line in QTableView copy to QClipboard

    - by Berschi
    Hi. First of all, sorry for bad English. It's about C++ and Qt. I have a SQLite-Database and I did it into a QSqlTableModel. To show the Database, I put that Model into a QTableView. Now I want to create a Method where the selected Rows (or the whole Line) will be copied into the QClipboard. After that I want to insert it into my OpenOffice.Calc-Document. But I have no Idea what to do with the "Selected"-SIGNAL and the QModelIndex and how to put this into the Clipboard. So can you please help me? Berschi

    Read the article

  • QObject cloning

    - by Olorin
    I know that Qobjects are supposed to be identities not values eg you cannot copy them and by default the copy constructor and asignment are disabled as explained in qt documentation. But is it possible to create a new Qobject from an existing one using a clone method? Would this be a logic error ? If i say QObject b; QObject a; b.cloneFrom(a); or QObject a = new QBject(); QObject b = new QBject(); b->cloneFrom(a); and the clone method copyes stuff like members etc would this be wrong? And if this is ok can i write my own copy constructor and asignment operator that does just that? Note: i actually want to try this with classes that inherit qobject.

    Read the article

  • mingw spitting countless warnings about ignoring "dll import" attribute

    - by hasen j
    I'm using mingw32-make to compile a qt project that uses opengl, it compiles correctly and everything, but it spits countless warning messages of the form: c:/qt3/include/qcolor.h:67: warning: inline function `int qGray(int, int, int)' declared as dllimport: attribute ignored For this particular instance, the function declaration is: Q_EXPORT inline int qGray( int r, int g, int b )// convert R,G,B to gray 0..255 { return (r*11+g*16+b*5)/32; } My question is, why is it spitting all these warning? how can I silence them without silencing other legitimate warnings (i.e. warnings that are related directly to my code and could be potential problems)? More importantly, why is mingw ignoring the dll import attribute in the first place?

    Read the article

  • Signals and slots in PyQt

    - by Skilldrick
    In the past I've had some experience of Qt in C++. I've now started using PyQt, and finding it a bit bewildering. There doesn't seem to be any definitive source of documentation, apart from a small amount at Riverbank. I guess the first thing I'd like to know is that there's an initial hump with PyQt, and it does get easier. The Riverbank docs talk about new style signals and slots for PyQt, as well as old style. They suggest that the new style is better, but I was wondering if that is what most users of PyQt do.

    Read the article

  • on some Windows machines, skinned applications sometimes loses their skin. any ideas?

    - by Lior
    Hi we are developing a skinned application, and under vista/windows 7, on some machines, skinned applications sometimes loses their skin. here's an example for the problem, and here's how the application looks when it's good. this happens to us whether we develop with native Win32 API or in QT. It happens spontanously, with no event that might explain it. btw, we see it happens sometimes to some other applications, too we solve it by repainting everything every 2-3 seconds. but this is an ugly hack... any ideas why this could happen? thanks _very_much_ for any lead - Lior

    Read the article

  • QWidget keyPressEvent override

    - by eaigner
    Hi there, I'm trying for half an eternity now overriding QWidgets keyPressEvent function in QT but it just won't work. I've to say i am new to CPP, but I know ObjC and standard C. My problem looks like this: class QSGameBoard : public QWidget { Q_OBJECT public: QSGameBoard(QWidget *p, int w, int h, QGraphicsScene *s); signals: void keyCaught(QKeyEvent *e); protected: virtual void keyPressEvent(QKeyEvent *event); }; QSGameBoard is my QWidget subclass and i need to override the keyPressEvent and fire a SIGNAL on each event to notify some registered objects. My overridden keyPressEvent in QSGameBoard.cpp looks like this: void QSGameBoard::keyPressEvent(QKeyEvent *event) { printf("\nkey event in board: %i", event->key()); //emit keyCaught(event); } When i change QSGameBoard:: to QWidget:: it receives the events, but i cant emit the signal because the compiler complains about the scope. And if i write it like this the function doesn't get called at all. What's the problem here?

    Read the article

  • QPainter paints garbage

    - by DSblizzard
    Fragment of program code: def add_link(Item0Num, Item1Num): global Mw, View # Mw - MainWindow if Item0Num != Item1Num and not link_exists(Item0Num, Item1Num): append( links_to(Item1Num), Item0Num ) append( links_from(Item0Num), Item1Num ) LinkGi = TLinkGi() Mw.Scene.addItem(LinkGi) LinkGi.setZValue(200) LinkGi.scale(1 / View.Scale, 1 / View.Scale) LinkGi.Item0Num = Item0Num LinkGi.Item1Num = Item1Num class TLinkGi(QGraphicsItem): def paint(self, Painter, StyleOptionGraphicsItem, Widget): global Mw, View Pen = QPen(Qt.black, 1) Painter.setPen(Pen) X0, Y0 = task_center(self.Item0Num) self.setPos(X0, Y0) X1, Y1 = task_center(self.Item1Num) X, Y = int( (X1 - X0) * View.Scale ), int( (Y1 - Y0) * View.Scale ) Painter.drawLine(0, 0, X, Y) #Mw.Scene.update(0, 0, Plan.Size, Plan.Size) # (1) #Mw.gvMain.repaint() # (2) def boundingRect(self): global View Rect = QRectF(0, 0, Plan.Size, Plan.Size) return Rect This paints such garbage: http://img697.imageshack.us/content_round.php?page=done&l=img697/5395/qpaintergarbage1.jpg When lines (1) and (2) are uncommented things doesn't become much better: http://img63.imageshack.us/content_round.php?page=done&l=img63/9693/qpaintergarbage0.jpg Please help me to solve this problem.

    Read the article

  • Touch screens for kiosk applications

    - by Micah
    I'm developing a kiosk-style touchscreen application in Qt. Currently I'm using an Elo Touch surface acoustic wave touchmonitor which works well except for one thing: drag performance is way too poor to provide a good user experience. As this is the case for the cursor in X as well as in my application, it seems to be either the fault of X (probably not) or the touchmonitor. Since mobile platforms are able to achieve very high performance in this regard, it seems like it should be possible for vastly more powerful desktop systems. Does anybody have experience with getting good drag performance out of desktop touchmonitors? What hardware have you used? Is X to blame?

    Read the article

  • ChaiScript troubles

    - by Ockonal
    Hello guys, I'm using script language ChaiScript with c++ and Qt. I've defined such function: void ChaiPainter::drawRectangle(QPainter *painter, int x, int y, int height, int width) { painter.drawRect(x, y, width, height); } And in application paint-event: void MainWindow::paintEvent(QPaintEvent *event) { QPainter painter(this); chaiPainter->mChai.add(chaiscript::var(&painter), "painter"); chaiPainter->mChai.add(chaiscript::fun(&ChaiPainter::drawRectangle), "drawRect"); chaiPainter->mChai("drawRect(painter, 5, 5, 100, 100)"); } The error is: 'chaiscript::Eval_Error' what(): Error: "No matching function to dispatch to with function 'drawRect'" during evaluation at (1, 1) What I do wrong?

    Read the article

  • How to draw QGraphicsItem in a MFC view

    - by user336969
    I'm starting using Qt in my application. My application is MFC based. I want to draw some QGraphicsItems in my currect MFC view, is it possible? You may say that it could be done by hosting QGraphicsView with QWinWidget in the MFC view, that don't work, however. Because my Canvas (MFC view) supports zooming and rotating while the QGraphicsView itself don't. When I zooming the QGraphicsItem, the QGraphicsView shows scroll bar instead of enlarging itself. Any suggestion? Thanks!

    Read the article

  • Problem with signals and slots

    - by Jen
    I am creating a class with custom slots in Qt: class CustomEdit : public QTextEdit { Q_OBJECT public: CustomEdit(QWidget* parent); public slots: void onTextChanged (); }; However, I'm getting thise linker error: undefined reference to 'vtable for CustomEdit' The documentation says: if you get compiler errors along the lines of "undefined reference to vtable for LcdNumber", you have probably forgotten to run the moc or to include the moc output in the link command. ... but it is not obvious what that means. Is there something I need to add to my class, or to the .pro file?

    Read the article

  • How can I update fontconfig to a newer version in Red Hat 5.3?

    - by yan bellavance
    I want to update fontconfig to a newer version but it seems that the OS is still finding the old fontconfig and I need the newer version to build qt. How do I make Red Hat 5.3 see the newer version? I do not know if this helps but when I did a search for fontconfig I found some files in a folder called cache. When I do yum update it tells me everything is up to date but that version is too old and is missing FcFreeTypeQueryFace. Just send me a comment if this is wrong site and ill change it.

    Read the article

  • How to make a 3D UI for an application ?

    - by wacky_coder
    I'm building an application and I'd like its User Interface to be 3D, most probably a cylinder. The user would see the cylinder[Horizontally laid] and the cylinder's curved surface would have the buttons and any other controls that need to be placed. The cylinder needs to rotate and later, I'd like to add some other effects to the cylinder too. Someone told me that such a UI can be modelled using Maya or Blender and exported to openGL and then I could use C/C++ (with Qt) to carry out the actions. How can this be done?? Is there any other way to build the UI and do all the other things that I need ?? I really need some help because I have the UI in mind, but no idea on how to implement it. Thanks

    Read the article

  • How can I set the line style of a specific cell in a QTableView?

    - by Bob Nelson
    I am working with a QT GUI. I am implementing a simple hex edit control using a QTableView. My initial idea is to use a table with seventeen columns. Each row of the table will have 16 hex bytes and then an ASCII representation of that data in the seventeenth column. Ideally, I would like to edit/set the style of the seventeenth column to have no lines on the top and bottom of each cell to give the text a free flowing appearance. What is the best way to approach this using the QTableView?

    Read the article

< Previous Page | 40 41 42 43 44 45 46 47 48 49 50 51  | Next Page >