Search Results

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

Page 38/119 | < Previous Page | 34 35 36 37 38 39 40 41 42 43 44 45  | Next Page >

  • CSS - Which method is better?

    - by Joe
    Which is better in regards to processing time but also taking into account ease of use for a developer? .font_small{ font-size:10px; } .font_blue{ color:blue; } .font_red{ color:red; } <span class="font_small font_blue">Hello World!</span><br /> <span class="font_small font_red">Today's the day!</span> OR .font_blue_small{ color:blue; } .font_red_small{ color:red; } .font_blue_small .font_red_small { font-size:10px; } <span class="font_blue_small">Hello World!</span><br /> <span class="font_red_small">Today's the day!</span> OR .font_blue_small{ color:blue; font-size:10px; } .font_red_small{ color:red; font-size:10px; } <span class="font_blue_small">Hello World!</span><br /> <span class="font_red_small">Today's the day!</span> OR Another option I haven't though of yet...?

    Read the article

  • CSS Sprites Bottom repeating

    - by Wayne
    Can you bottom repeat a sprite background where I want the sprite to be set of the background on the bottom of the div. I have this: .statistics-wrap { margin-top: 10px; background: url(../img/bg-sprite.png) repeat-x 0 -306px bottom; overflow: hidden; border: 1px #BEE4EA solid; border-radius: 5px; -moz-border-radius: 5px; padding: 10px; } It doesn't seem to appear, if I remove the bottom it will appear but it is set in the background repeating horizontally at the top of the div which I want it to repeat at the bottom. Is it possible?

    Read the article

  • Applying style sheets in pyqt

    - by Jebagnanadas
    Hello all, If i apply a property to a parent widget it is automatically applied for child widgets too.. Is there any way of preventing this?? For example if i set background color as white in a dialog the button,combo boxes and scroll bars looks white as it lacks it native look(have to say it's unpleasant & ugly).. Is there any way that i can apply the stylesheets only to a parent widget not to it's children??? Experts help please..

    Read the article

  • error: 'QTabWidget::QTabWidget(const QTabWidget&)' is private

    - by Mahdi_Nine
    I develop a program and I have 10 backups of it. I added some lines to it and when I compiled the project and now it has the following error: C:\Qt\Qt5.0.1\5.0.1\mingw47_32\include\QtWidgets\qtabwidget.h:173: error: 'QTabWidget::QTabWidget(const QTabWidget&)' is private the error is from * line namespace Ui { class ContentControl; } class ContentControl : public QTabWidget // * from this line { Q_OBJECT public: . . . } All backups have this error now. Any idea why? I re-installed Qt but the problem is still present.

    Read the article

  • How to retrieve a style's value in javascript?

    - by stan
    I am looking for a way to retrieve the style from an element that has a style set upon it by the style tag. <style> #box {width: 100px;} </style> In the body <div id="box"></div> I'm looking for straight javascript without the use of libraries. I tried the following, but keep receiving blanks: alert (document.getElementById("box").style.width); alert (document.getElementById("box").style.getPropertyValue("width")); I noticed that I'm only able to use the above if I have set the style using javascript, but unable to with the style tags.

    Read the article

  • Website in right-to-left languages (Arabic, Hebrew)

    - by jack
    I currently developing a multi-language interface for a Django project. But when I started to work on Arabic and Hebrew languages, I noticed all pages messed up after dir="rtl" to html tag (according to instructions on http://www.w3.org/International/tutorials/bidi-xhtml/) Does that mean I need separate stylesheets for right-to-left languages?

    Read the article

  • Embedded QGraphicsView do not hide after Dialog closes

    - by torsten
    I call a QDialog in to modes, showNormal and showFullscreen. In normal mode all works fine. With a Keyevent the Dialog closes as expected. In Fullscreen, after a keyevent the Dialog closes, but the QGraphicsView will stay on top. All things i've tried (like closing/updating the view) failed. the View sta on top. view = new QGraphicsView(scene); view->setViewport(new QGLWidget(QGLFormat(QGL::SampleBuffers))); view->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); view->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); view->setViewportUpdateMode(QGraphicsView::FullViewportUpdate); view->setFrameStyle(QFrame::NoFrame); view->setBackgroundBrush(Qt::white); view->setRenderHints(QPainter::Antialiasing); view->setSceneRect(0,0,resolution.x(),resolution.y()); Maybe my structure will help to solve the Problem: This call the QDialog named GraphicsWidgetDialog. void DemoArrowDialog::setDemo() { gwd->graphicsWidget->setListenKeyEvents(true); gwd->setWindowTitle("Demo"); gwd->setFixedSize(500,500); gwd->restoreGeometry(settings); gwd->setContentsMargins(0,0,0,0); gwd->setModal(false); gwd->showNormal(); gwd->graphicsWidget->show(); gwd->setFocus(); } void DemoArrowDialog::setFullScreenDemo() { settings = gwd->saveGeometry(); gwd->graphicsWidget->setListenKeyEvents(true); gwd->setContentsMargins(0,0,0,0); gwd->setModal(true); gwd->graphicsWidget->showFullScreen(); gwd->showFullScreen(); gwd->setFocus(); } This is the Definition of the GraphicsWidgetDialog GraphicsWidgetDialog::GraphicsWidgetDialog(QWidget *parent) : QDialog(parent) { graphicsWidget = new GraphicsWidget; QGridLayout *layout = new QGridLayout; layout->addWidget(graphicsWidget); layout->setContentsMargins(0,0,0,0); graphicsWidget->loadConfig(); graphicsWidget->loadArrowConfig("Arrow"); graphicsWidget->setArrowPosition(arrowPosition(arrowCenter)); graphicsWidget->update(); setLayout(layout); connect(graphicsWidget,SIGNAL(closeEvent()),this,SLOT(reject())); } The GraphicsWidget is the Widget that contains the QGraphcisView and Scene On keyPessEvent it will emit the closeEvent(). Any Idea?

    Read the article

  • Prevent Text Input expanding in IE

    - by Caroline
    Hi, I am having a problem with an input field in IE. The code is for a portlet and widths need to be dynamic as the user can place the portlet on any of the three columns in the page which all have different widths. As always it works fine in FF but not in IE. In order to make the width dyanaic I have set width="100%". Data to populate the text input comes from a DB. When the page is rendered if there is a long URL the text input expands to fill the contents in IE but in FF it just stays the same width (ie 100% of the TD that it lives in). How can I stop IE from changing the width in order to fit the contents. Setting the width to a fixed width of 100px fixes the issue but I need to have the width as a percentage in order to accommodate the layout of the portlet wherever it is put in on the page. I have tried overflow:hidden and word-wrap:break-word but I cant get either to work. Here is my input code and style sheets <td class="right" > <input type="text" class="validate[custom[url]]" value="" id="linkText" name="communicationLink" maxlength="500" maxsize="100" /> </td> .ofCommunicationsAdmin input { font-family: "Trebuchet MS"; font-size: 11px; font-weight:normal; color:#333333; overflow:hidden; } .ofCommunicationsAdmin #linkText { overflow:hidden; width:100%; border:1px #cccccc solid; background:#F4F7ED top repeat-x; } .ofCommunicationsAdmin td.right { vertical-align: top; text-align: left; }

    Read the article

  • Multiple Context menus in PyQt based on mouse location

    - by Nader
    I have a window with multiple tables using QTableWidget (PyQt). I created a popup menu using the right click mouse and it works fine. However, I need to create different popup menu based on which table the mouse is hovering over at the time the right mouse is clicked. How can I get the mouse to tell me which table it is hovering over? or, put in another way, how to implement a method so as to have a specific context menu based on mouse location? I am using Python and PyQt. My popup menu is developed similar to this code (PedroMorgan answer from Qt and context menu): class Foo( QtGui.QWidget ): def __init__(self): QtGui.QWidget.__init__(self, None) # Toolbar toolbar = QtGui.QToolBar() # Actions self.actionAdd = toolbar.addAction("New", self.on_action_add) self.actionEdit = toolbar.addAction("Edit", self.on_action_edit) self.actionDelete = toolbar.addAction("Delete", self.on_action_delete) # Tree self.tree = QtGui.QTreeView() self.tree.setContextMenuPolicy( Qt.CustomContextMenu ) self.connect(self.tree, QtCore.SIGNAL('customContextMenuRequested(const QPoint&)'), self.on_context_menu) # Popup Menu self.popMenu = QtGui.QMenu( self ) self.popMenu.addAction( self.actionEdit ) self.popMenu.addAction( self.actionDelete ) self.popMenu.addSeparator() self.popMenu.addAction( self.actionAdd ) def on_context_menu(self, point): self.popMenu.exec_( self.tree.mapToGlobal(point) )

    Read the article

  • QTreeView memory consumption

    - by Eye of Hell
    Hello. I'm testing QTreeView functionality right now, and i was amazed by one thing. It seems that QTreeView memory consumption depends on items count O_O. This is highly unusual, since model-view containers of such type only keeps track for items being displayed, and rest of items are in the model. I have written a following code with a simple model that holds no data and just reports that it has 10 millions items. With MFC, Windows API or .NET tree / list with such model will take no memory, since it will display only 10-20 visible elements and will request model for more upon scrolling / expanding items. But with Qt, such simple model results in ~300Mb memory consumtion. Increasing number of items will increase memory consumption. Maybe anyone can hint me what i'm doing wrong? :) #include <QtGui/QApplication> #include <QTreeView> #include <QAbstractItemModel> class CModel : public QAbstractItemModel { public: QModelIndex index ( int i_nRow, int i_nCol, const QModelIndex& i_oParent = QModelIndex() ) const { return createIndex( i_nRow, i_nCol, 0 ); } public: QModelIndex parent ( const QModelIndex& i_oInex ) const { return QModelIndex(); } public: int rowCount ( const QModelIndex& i_oParent = QModelIndex() ) const { return i_oParent.isValid() ? 0 : 1000 * 1000 * 10; } public: int columnCount ( const QModelIndex& i_oParent = QModelIndex() ) const { return 1; } public: QVariant data ( const QModelIndex& i_oIndex, int i_nRole = Qt::DisplayRole ) const { return Qt::DisplayRole == i_nRole ? QVariant( "1" ) : QVariant(); } }; int main(int argc, char *argv[]) { QApplication a(argc, argv); QTreeView oWnd; CModel oModel; oWnd.setUniformRowHeights( true ); oWnd.setModel( & oModel ); oWnd.show(); return a.exec(); }

    Read the article

  • How to find item selected from customContextMenuRequested() on QTreeView item?

    - by vinaym
    I have implemented contextual menus in QTreeView items with the following code MyDerivedQTreeView->setModel(MyDerivedQAbstractItemModel); MyDerivedQTreeView->setContextMenuPolicy(Qt::CustomContextMenu); connect(MyDerivedQTreeView, SIGNAL(customContextMenuRequested(const QPoint &)), MyDerivedQAbstractItemModel(), SLOT(contextualMenu(const QPoint &))); void MyDerivedQAbstractItemModel::contextualMenu(const QPoint& point) { QMenu *menu = new QMenu; menu->addAction(QString("Test Item"), this, SLOT(test_slot())); menu->exec(MyDerivedQTreeView->mapToGlobal(point)); } MyDerivedQAbstractItemModel::contextualMenu() gets called and I can see the contextual menu. Problem is contextual menu should be visible only if user right-clicks on an item and it should be customized as per the item selected. How do I get whether/which item is selected from QPoint information? I am on Qt 4.5.3.

    Read the article

  • CSS being ignored in IE & FFox but not Chrome

    - by Grant
    Hi, i am styling a navigation menu using the following css. I have found that it works perfectly in chrome but absolutely none of the css is beign applied in firefox or IE. Is there something obvious that i havent done or have done here? <style type="text/css"> #ddm { margin: 0; padding: 0; } #ddm li { float: left; list-style: none; font: 8pt Tahoma, Geneva, sans-serif; } #ddm li a { display: block; padding: 5px 12px; text-decoration: none; border-right: 1px solid white; width: 70px; white-space: nowrap; color:Red; border: none; } #ddm li a:hover { color:White; background-color:#444444; } #ddm li ul { margin: 0; padding: 0; position: absolute; visibility: hidden; } #ddm li ul li { float: none; display: inline } #ddm li ul li a { width: auto; } #ddm li ul li a:hover { } </style> <ul id="ddm"> <li> <ul> <li><a href="#">test 1</a></li> <li><a href="#">test 2</a></li> </ul> </li> </ul>

    Read the article

  • Simulating a mouse button click in Windows

    - by Ncarlson
    Hi everyone, I'm writing Remote Desktop clone in C++ using QT. So far I'm able to move the mouse cursor around fine. QT has a nice setPos function for that. However, I'm a bit lost as to what API/Library to use for simulating mouse button clicks. One method I'm aware of is to send the WM_(event) to a window using the window's HWND. However, I was hoping there was a more salient method for taking complete control over a mouse. Is there any other way to tell the operating system that the left mouse button has been clicked? Thanks.

    Read the article

  • Wordpress/CSS: List Style Problem.

    - by Ben
    Hi all! I am reasonably new to Wordpress custom themes but I do have some knowlege of CSS, although I am terrible at customising other peoples code which is why I have the problem I am about to explain. I have started a website that my girlfriend and I are doing together. It uses the Simplo Wordpress theme which is pretty cool but when you add a post that has a list in it. It doesn't show the bullets on each of the items. I have tried adding 'list-style:circle;' to a the.postItem class and a couple of other divs and classes that I thought were relevant but it doesn't work. You can take a look for yourself, it may be easier to understand my problem that way. If you go to: http://brokeandstarving.com/234/bennos-shepherds-pie/ there is a list of ingredients and also the steps under the method is a list as well. My question is, where do I edit the CSS to make the bullets appear next to the list items? I hope that makes sense. Thanks in advance, - Ben

    Read the article

  • Generic CSS templates anywhere (not layout)?

    - by TruMan1
    I am looking for a place where I can download a bunch of CSS stylesheets to change the appearance of my titles, links, paragraphs, etc. I am not an artist, so I am hoping to leverage other people's skills in choosing the right fonts, colors, sizes, etc. I do not want to include layout because then it won't be as generic. Does anyone know where I can get something like this?

    Read the article

  • Animated gifs in QMovie

    - by Jason
    I'm displaying an animated gif in my application by creating a QLabel, and setting the movie as a QMovie. The problem I'm having is that when the gif is displayed, any part of the image that stays a constant color throughout the animation shows up as the background color. I hope I'm explaining that clearly. Here's the code I'm using to create the animation if that helps: rewardLabel=new QLabel(); rewardLabel->setCursor(QCursor(Qt::BlankCursor)); rewardLabel->setWindowFlags(Qt::FramelessWindowHint); rewardLabel->hide(); string movieTemp="animations/"+animationFiles[animationIndex]; QString movieFile(movieTemp.c_str()); rewardMovie=new QMovie(movieFile); rewardLabel->setMovie(rewardMovie); Let me know if I need to explain the situation better. Thanks in advance.

    Read the article

  • In CSS, can "#footer #caption" coexist with "#content # caption"?

    - by Jian Lin
    I was going to "nest" the CSS ids like this #content #caption { color: teal } ... #footer #caption { margin: 2em 1em } because that's the way SASS (a CSS generator) can do nesting for... but then in one HTML document, we cannot have two ids with the same name, isn't that true, so the above nesting won't work or won't work well. (esp if document.getElementById() or $('#caption') or $('caption') is needed to select the element). We can use #content #content_caption { color: teal } ... #footer #footer_caption { margin: 2em 1em } but then why 1 more level of nesting? why not just #content_caption { color: teal } ... #footer_caption { margin: 2em 1em } ?

    Read the article

  • changing css properties via javascript

    - by tic
    I need a function to change the appearance of some elements in my html page "on the fly", but I am not able to do. The problem is that I cannot use a command like document.write ('body {background-color: #cccccc;}'); because I need to make the changes effective when the page is already loaded, using a link like <a onmouseclick="Clicker(1)" href="#">clic</a> and I cannot use a command like document.body.style.background='#cccccc'; because I do not know if it can be applied to other not so easy cases, because I need to change the appearance of elements such as td.myclass or sibling elements such as th[scope=col]+th[scope=col]+th[scope=col]. How can I do it? Thanks!

    Read the article

  • Proper way to use multiple stylesheets...so it WORKS?

    - by thatryan
    I am making a site where I need to have styles separated for layout, colors and typography. So basically I took my main style sheet and just copied it 3 times, and in removed everything but coloring from one, everything but type related in another and etc. But when I link to them now there must be some cascade issue or something, because a lot of the type stuff is not being applied. Is there a proper way to do this?

    Read the article

  • Design pattern for mouse interaction

    - by mike
    I need some opinions on what is the "ideal" design pattern for a general mouse interaction. Here the simplified problem. I have a small 3d program (QT and openGL) and I use the mouse for interaction. Every interaction is normally not only a single function call, it is mostly performed by up to 3 function calls (initiate, perform, finalize). For example, camera rotation: here the initial function call will deliver the current first mouse position, whereas the performing function calls will update the camera etc. However, for only a couple of interactions, hardcoding these (inside MousePressEvent, MouseReleaseEvent MouseMoveEvent or MouseWheelEvent etc) is not a big deal, but if I think about a more advanced program (e.g 20 or more interactions) then a proper design is needed. Therefore, how would you design such a interactions inside QT. I hope I made my problem clear enough, otherwise don't bother complain :-) Thanks

    Read the article

< Previous Page | 34 35 36 37 38 39 40 41 42 43 44 45  | Next Page >