这篇教程C++ tabRect函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中tabRect函数的典型用法代码示例。如果您正苦于以下问题:C++ tabRect函数的具体用法?C++ tabRect怎么用?C++ tabRect使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了tabRect函数的26个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: queueDDvoid ThemeEngine::drawTab(const Common::Rect &r, int tabHeight, int tabWidth, const Common::Array<Common::String> &tabs, int active, uint16 hints, int titleVPad, WidgetStateInfo state) { if (!ready()) return; queueDD(kDDTabBackground, Common::Rect(r.left, r.top, r.right, r.top + tabHeight)); for (int i = 0; i < (int)tabs.size(); ++i) { if (i == active) continue; if (r.left + i * tabWidth > r.right || r.left + (i + 1) * tabWidth > r.right) continue; Common::Rect tabRect(r.left + i * tabWidth, r.top, r.left + (i + 1) * tabWidth, r.top + tabHeight); queueDD(kDDTabInactive, tabRect); queueDDText(getTextData(kDDTabInactive), getTextColor(kDDTabInactive), tabRect, tabs[i], false, false, _widgets[kDDTabInactive]->_textAlignH, _widgets[kDDTabInactive]->_textAlignV); } if (active >= 0 && (r.left + active * tabWidth < r.right) && (r.left + (active + 1) * tabWidth < r.right)) { Common::Rect tabRect(r.left + active * tabWidth, r.top, r.left + (active + 1) * tabWidth, r.top + tabHeight); const uint16 tabLeft = active * tabWidth; const uint16 tabRight = MAX(r.right - tabRect.right, 0); queueDD(kDDTabActive, tabRect, (tabLeft << 16) | (tabRight & 0xFFFF)); queueDDText(getTextData(kDDTabActive), getTextColor(kDDTabActive), tabRect, tabs[active], false, false, _widgets[kDDTabActive]->_textAlignH, _widgets[kDDTabActive]->_textAlignV); }}
开发者ID:megaboy,项目名称:scummvm,代码行数:27,
示例2: tabRectvoid MyTabBar::mouseReleaseEvent ( QMouseEvent * event ){ int xx= event->x() - tabRect(currentIndex()).x(); int yy= event->y() - tabRect(currentIndex()).y(); //FIXME : make a best test for detecting click on close icon if(xx>7 && yy>7 && xx<21 && yy<21) { QWidget * oldWidget= ((SearchResultsTabWidget*)parent())->widget(currentIndex()); ((SearchResultsTabWidget*)parent())->removeTab(currentIndex()); delete oldWidget; }}
开发者ID:nsb,项目名称:Calypso,代码行数:12,
示例3: TabPreviewPopupvoid TabBar::showTabPreview(){ if (m_isFirstTimeOnTab) m_isFirstTimeOnTab = false; //delete previous tab preview delete m_previewPopup.data(); m_previewPopup.clear(); MainView *mv = qobject_cast<MainView *>(parent()); WebTab *indexedTab = mv->webTab(m_currentTabPreviewIndex); WebTab *currentTab = mv->webTab(currentIndex()); // check if view && currentView exist before using them :) if (!currentTab || !indexedTab) return; // no previews during load if (indexedTab->isPageLoading()) return; // Make sure the hovered webtab match the current size // Only the active one is updated by window resize events indexedTab->resize(currentTab->size()); m_previewPopup = new TabPreviewPopup(indexedTab , this); int tabWidth = tabSizeHint(m_currentTabPreviewIndex).width(); int tabBarWidth = mv->size().width(); int leftIndex = tabRect(m_currentTabPreviewIndex).x() + (tabRect(m_currentTabPreviewIndex).width() - tabWidth) / 2; int popupWidth = m_previewPopup.data()->thumbnailSize().width(); // Center the popup if the tab width is bigger or smaller leftIndex += (tabWidth - popupWidth) / 2; if (leftIndex < 0) { leftIndex = 0; } else if (leftIndex + tabWidth > tabBarWidth) { leftIndex = tabBarWidth - tabWidth; } QPoint pos(leftIndex, tabRect(m_currentTabPreviewIndex).y() + tabRect(m_currentTabPreviewIndex).height()); m_previewPopup.data()->show(mapToGlobal(pos));}
开发者ID:Arakmar,项目名称:rekonq,代码行数:48,
示例4: iconRectQRect YaTabBarBase::tabIconRect(int index) const{ QRect iconRect(tabRect(index)); iconRect.setLeft(iconRect.left() + margin()); iconRect.setWidth(cachedIconSize_.width()); return iconRect;}
开发者ID:mblsha,项目名称:yapsi-psi-snapshot,代码行数:7,
示例5: GameEntityHealthGUI::HealthGUI(IrrlichtDevice *device) : GameEntity(device){ //Create the array of healthbars healthbars = new HealthBar*[MAX_HEALTH_BARS]; dimension2d<s32> screenDim = driver->getScreenSize(); //Rectangle at the upper middle of screen rect<s32> tabRect(screenDim.Width/2 - 110, 25, screenDim.Width/2 + 75, 50); //Create a tab that will house the healthbars healthTab = env->addTab(tabRect); //Populate the array for(s32 i=0; i < MAX_HEALTH_BARS; i++) { //Allocate space healthbars[i] = new HealthBar(device); //Set the healthbar as active healthbars[i]->SetActive(true); //Set the position for the healthbar position2d<s32> pos = position2d<s32>( tabRect.UpperLeftCorner.X + (i*20 + healthbars[i]->GetTexture()->getSize().Width), tabRect.UpperLeftCorner.Y); //Add healthbar to the panel of healthbars healthTab->addChild(env->addImage(healthbars[i]->GetTexture(), pos)); }}
开发者ID:Ayoub-89,项目名称:Software-Portfolio,代码行数:27,
示例6: tabAtvoid TabBar::showTabPreview(bool delayed){ if (!m_showTabPreviews) { return; } if (delayed) { int index = tabAt(mapFromGlobal(QCursor::pos())); if (index == -1 || QApplication::mouseButtons() != Qt::NoButton) { return; } m_tabPreview->setPreviewIndex(index); m_tabPreviewShowTimer->stop(); } WebTab* webTab = qobject_cast<WebTab*>(m_tabWidget->widget(m_tabPreview->previewIndex())); if (!webTab) { return; } m_tabPreviewHideTimer->stop(); m_tabPreview->setWebTab(webTab, m_tabPreview->previewIndex() == currentIndex()); QRect r(tabRect(m_tabPreview->previewIndex())); r.setTopLeft(mapTo(m_window, r.topLeft())); r.setBottomRight(mapTo(m_window, r.bottomRight())); m_tabPreview->showOnRect(r);}
开发者ID:593in,项目名称:qupzilla,代码行数:30,
示例7: pvoid YaTabWidget::paintEvent(QPaintEvent*){ return; QPainter p(this);#ifndef WIDGET_PLUGIN QRect rect = this->rect().adjusted(0, 0, 0, -50); QRect contentsRect = rect.adjusted(Ya::VisualUtil::windowShadowSize(), Ya::VisualUtil::windowShadowSize(), -Ya::VisualUtil::windowShadowSize(), 0); Ya::VisualUtil::drawWindowTheme(&p, theme(), rect, contentsRect, isActiveWindow()); Ya::VisualUtil::drawAACorners(&p, theme(), rect, contentsRect);#else p.fillRect(rect(), Qt::red);#endif#if 0 if (tabBar()->isVisible()) { QRect r = tabRect(); int y = tabBar()->geometry().top(); p.fillRect(QRect(QPoint(r.left(), y), r.bottomRight()), static_cast<YaTabBarBaseClass*>(tabBar())->tabBackgroundColor());#ifndef WIDGET_PLUGIN p.setPen(Ya::VisualUtil::rosterTabBorderColor());#endif p.drawLine(tabBar()->geometry().topLeft(), QPoint(r.right(), y)); }#endif}
开发者ID:mblsha,项目名称:yapsi-psi-snapshot,代码行数:27,
示例8: pvoid YTTabBar::paintEvent(QPaintEvent *event){ QPainter p(this); for(int i=0; i < count(); ++i) { QRect r = tabRect(i); if(i != count() -1) r.adjust(0,0, -1, 0); if(i == pressedIndex) { p.drawPixmap(r, clickedPix); } else if(i == currentIndex()) { p.drawPixmap(r, selectedPix); } else if(i == hoveredIndex) { p.drawPixmap(r, hoverPix); } else { p.drawPixmap(r, nonSelectedPix); } if(i != count() -1) p.drawPixmap(r.right()+1, r.top(), sepPix.width(), r.height() ,sepPix); p.drawText(r, Qt::AlignCenter ,tabText(i) ); }}
开发者ID:pder,项目名称:smtube,代码行数:29,
示例9: tabAtvoid QtDNDTabBar::dropEvent(QDropEvent* dropEvent) { QtDNDTabBar* sourceTabBar = dynamic_cast<QtDNDTabBar*>(dropEvent->source()); if (sourceTabBar && dropEvent->mimeData() && dropEvent->mimeData()->data("action") == QByteArray("application/tab-detach")) { QtDNDTabBar* source = dynamic_cast<QtDNDTabBar*>(dropEvent->source()); int targetTabIndex = tabAt(dropEvent->pos()); QRect rect = tabRect(targetTabIndex); if (targetTabIndex >= 0 && (dropEvent->pos().x() - rect.left() - rect.width()/2 > 0)) { targetTabIndex++; } QWidget* tab = source->getDragWidget(); assert(tab); QTabWidget* targetTabWidget = dynamic_cast<QTabWidget*>(parentWidget()); QString tabText = source->getDragText(); /* * When you add a widget to an empty QTabWidget, it's automatically made the current widget. * Making the widget the current widget, widget->show() is called for the widget. Directly reacting * to that event, and adding the widget again to the QTabWidget results in undefined behavior. For * example the tab label is shown but the widget is neither has the old nor in the new QTabWidget as * parent. Blocking signals on the QWidget to be added to a QTabWidget prevents this behavior. */ targetTabWidget->setUpdatesEnabled(false); tab->blockSignals(true); targetTabWidget->insertTab(targetTabIndex, tab, tabText); dropEvent->acceptProposedAction(); tab->blockSignals(false); targetTabWidget->setUpdatesEnabled(true); onDropSucceeded(); }}
开发者ID:scopeInfinity,项目名称:swift,代码行数:33,
示例10: eventFilterbool QColorTabBar::eventFilter(QObject *target, QEvent *evt){ if( target == this ) { if( evt->type() == QEvent::HoverMove ) { for( int i=0; i<count(); i++ ) { QMouseEvent* pEvt = (QMouseEvent*)evt; if( tabRect(i).contains(pEvt->pos()) ) { m_nHoverIndex = i; setCursor( Qt::PointingHandCursor ); break; } } update(); } else if( evt->type() == QEvent::HoverLeave ) { m_nHoverIndex = -1; setCursor( Qt::ArrowCursor ); update(); } } return QTabBar::eventFilter(target, evt);}
开发者ID:habilience,项目名称:habilience-t3ksensor-tools,代码行数:30,
示例11: switchbool PlaylistTabBar::event(QEvent* e) { switch (e->type()) { case QEvent::ToolTip: { QHelpEvent* he = static_cast<QHelpEvent*>(e); QRect displayed_tab; QSize real_tab; bool is_elided = false; real_tab = tabSizeHint(tabAt(he->pos())); displayed_tab = tabRect(tabAt(he->pos())); // Check whether the tab is elided or not is_elided = displayed_tab.width() < real_tab.width(); if (!is_elided) { // If it's not elided, don't show the tooltip QToolTip::hideText(); } else { QToolTip::showText(he->globalPos(), tabToolTip(tabAt(he->pos()))); } return true; } default: return QTabBar::event(e); }}
开发者ID:jamie-gifford,项目名称:Clementine,代码行数:25,
示例12: tabAt/** Redefined to display an editable area. */void TabBar::mouseDoubleClickEvent(QMouseEvent *event){ int tabIndex = tabAt(event->pos()); int c = currentIndex(); if (-1 < tabIndex && tabIndex < count() && c == tabIndex) { QRect visualRect = tabRect(tabIndex); SettingsPrivate *settings = SettingsPrivate::instance(); if (settings->isRectTabs()) { visualRect.setLeft(visualRect.left() + 1); visualRect.setRight(visualRect.right() - 1); } else { visualRect.setLeft(visualRect.left() + 3 + settings->tabsOverlappingLength() * 1.25 + height() / 2); visualRect.setRight(visualRect.right() - settings->tabsOverlappingLength()); } visualRect.setTop(visualRect.top() + 1); // Disable close buttons in case of unfortunate click for (int t = 0; t < count(); t++) { QWidget *button = tabButton(t, QTabBar::RightSide); if (button && t != tabIndex) { button->setEnabled(false); } } // Feed the QLineEdit with current tab text lineEdit->setText(tabText(tabIndex)); lineEdit->selectAll(); lineEdit->setFocus(); lineEdit->setGeometry(visualRect); lineEdit->setVisible(true); lineEdit->grabMouse(); } QTabBar::mouseDoubleClickEvent(event);}
开发者ID:VengefulVeggie,项目名称:Miam-Player,代码行数:35,
示例13: windowbool QtDNDTabBar::event(QEvent* event) { QMouseEvent* mouseEvent = dynamic_cast<QMouseEvent*>(event); if (mouseEvent) { QWidget* childAtPoint = window()->childAt(mapTo(window(), mouseEvent->pos())); QtDNDTabBar* underMouse = dynamic_cast<QtDNDTabBar*>(childAtPoint); if (!underMouse && childAtPoint) { underMouse = dynamic_cast<QtDNDTabBar*>(childAtPoint->parent()); } if (!underMouse && currentIndex() >= 0) { // detach and drag // stop move event QMouseEvent* finishMoveEvent = new QMouseEvent (QEvent::MouseMove, mouseEvent->pos (), Qt::NoButton, Qt::NoButton, Qt::NoModifier); QTabBar::event(finishMoveEvent); delete finishMoveEvent; finishMoveEvent = NULL; // start drag QDrag* drag = new QDrag(this); QMimeData* mimeData = new QMimeData; // distinguish tab-reordering drops from other ones mimeData->setData("action", "application/tab-detach") ; drag->setMimeData(mimeData); // set drag image QRect rect = tabRect( currentIndex() );#if QT_VERSION >= 0x050000 QPixmap pixmap = grab(rect);#else QPixmap pixmap = QPixmap::grabWidget(this, rect);#endif QPixmap targetPixmap (pixmap.size ()); QPainter painter (&targetPixmap); painter.setOpacity(0.9); painter.drawPixmap(0,0, pixmap); painter.end (); drag->setPixmap (targetPixmap); drag->setHotSpot(QPoint(drag->pixmap().width()/2, drag->pixmap().height())); dragIndex = currentIndex(); dragText = tabText(dragIndex); dragWidget = dynamic_cast<QTabWidget*>(parent())->widget(dragIndex); assert(dragWidget); dynamic_cast<QTabWidget*>(parent())->removeTab(currentIndex()); Qt::DropAction dropAction = drag->exec(); if (dropAction == Qt::IgnoreAction) { // aborted drag, put tab back in place // disable event handling during the insert for the tab to prevent infinite recursion (stack overflow) dragWidget->blockSignals(true); dynamic_cast<QTabWidget*>(parent())->insertTab(dragIndex, dragWidget, dragText); dragWidget->blockSignals(false); } return true; } } return QTabBar::event(event);}
开发者ID:scopeInfinity,项目名称:swift,代码行数:59,
示例14: mouseDoubleClickTab /** * Overriding this allows us to emit signals for double clicks */ void M11TabBar::mouseDoubleClickEvent(QMouseEvent* event) { for (int i = 0; i < count(); i++) { if (tabRect(i).contains(event->pos())) { emit mouseDoubleClickTab(i); } } }
开发者ID:AlekSi,项目名称:Jabbin,代码行数:11,
示例15: findTabUnder/* * Returns the index of the tab at a position, or -1 if out of bounds. */int PsiTabBar::findTabUnder(const QPoint &pos) { for (int i = 0; i < count(); i++) { if (tabRect(i).contains(pos)) { return i; } } return -1;}
开发者ID:AlekSi,项目名称:Jabbin,代码行数:11,
示例16: tabRectQStyleOptionTabV2 YaTabBarBase::getStyleOption(int tab) const{ QStyleOptionTabV2 opt; opt.init(this); opt.state &= ~(QStyle::State_HasFocus | QStyle::State_MouseOver); opt.rect = tabRect(tab); bool isCurrent = tab == currentIndex(); opt.row = 0;// if (tab == pressedIndex)// opt.state |= QStyle::State_Sunken; if (isCurrent) opt.state |= QStyle::State_Selected; if (isCurrent && hasFocus()) opt.state |= QStyle::State_HasFocus; if (isTabEnabled(tab)) opt.state &= ~QStyle::State_Enabled; if (isActiveWindow()) opt.state |= QStyle::State_Active;// if (opt.rect == hoverRect)// opt.state |= QStyle::State_MouseOver; opt.shape = shape(); opt.text = tabText(tab); if (tabTextColor(tab).isValid()) opt.palette.setColor(foregroundRole(), tabTextColor(tab)); opt.icon = tabIcon(tab); opt.iconSize = opt.icon.actualSize(QSize(32, 32)); // Will get the default value then. int totalTabs = count(); if (tab > 0 && tab - 1 == currentIndex()) opt.selectedPosition = QStyleOptionTab::PreviousIsSelected; else if (tab < totalTabs - 1 && tab + 1 == currentIndex()) opt.selectedPosition = QStyleOptionTab::NextIsSelected; else opt.selectedPosition = QStyleOptionTab::NotAdjacent; if (tab == 0) { if (totalTabs > 1) opt.position = QStyleOptionTab::Beginning; else opt.position = QStyleOptionTab::OnlyOneTab; } else if (tab == totalTabs - 1) { opt.position = QStyleOptionTab::End; } else { opt.position = QStyleOptionTab::Middle; } if (const QTabWidget *tw = qobject_cast<const QTabWidget *>(parentWidget())) { if (tw->cornerWidget(Qt::TopLeftCorner) || tw->cornerWidget(Qt::BottomLeftCorner)) opt.cornerWidgets |= QStyleOptionTab::LeftCornerWidget; if (tw->cornerWidget(Qt::TopRightCorner) || tw->cornerWidget(Qt::BottomRightCorner)) opt.cornerWidgets |= QStyleOptionTab::RightCornerWidget; } return opt;}
开发者ID:mblsha,项目名称:yapsi-psi-snapshot,代码行数:58,
示例17: mousePressEvent void ModeTabBar::mousePressEvent(QMouseEvent *event) { QPoint pressPos = event->pos(); for(int i = 0; i < count(); ++i) { if(tabRect(i).contains(pressPos) && isTabEnabled(i)) { setCurrentIndex(i); break; } } }
开发者ID:KittyIM,项目名称:kitty.im,代码行数:10,
示例18: Q_ASSERTvoid FancyTabBar::setTabEnabled(int index, bool enable){ Q_ASSERT(index < m_tabs.size()); Q_ASSERT(index >= 0); if (index < m_tabs.size() && index >= 0) { m_tabs[index]->enabled = enable; update(tabRect(index)); }}
开发者ID:jassuncao,项目名称:myparts,代码行数:10,
示例19: QLineEditvoid TabBar::triggerRename(int index){ renamingIndex_ = index; lineEdit_ = new QLineEdit(this); lineEdit_->setText(tabText(index)); lineEdit_->installEventFilter(this); lineEdit_->setGeometry(tabRect(index)); lineEdit_->setCursorPosition(lineEdit_->text().size()); lineEdit_->setFocus(); lineEdit_->show();}
开发者ID:abenea,项目名称:fubar,代码行数:11,
示例20: currentIndexvoid TabBar::showTabPreview(){ WebTab* webTab = qobject_cast<WebTab*>(m_tabWidget->widget(m_tabPreview->previewIndex())); if (!webTab) { return; } m_tabPreviewTimer->stop(); m_tabPreview->setWebTab(webTab, m_tabPreview->previewIndex() == currentIndex()); m_tabPreview->showOnRect(tabRect(m_tabPreview->previewIndex()));}
开发者ID:ff2000,项目名称:qupzilla,代码行数:11,
示例21: pvoid QDockTabBar::paintEvent(QPaintEvent * e){ QTabBar::paintEvent(e); QPainter p(this); QRect rc = tabRect(insertPos_); rc.moveCenter(QPoint(rc.left(), rc.center().y())); p.setBrush(QBrush(QColor(0, 0, 255, 100))); p.setPen(QPen(Qt::blue)); p.drawRect(rc);}
开发者ID:Iownnoname,项目名称:qt,代码行数:12,
示例22: pvoid TabBar::paintEvent(QPaintEvent *){ SettingsPrivate *settings = SettingsPrivate::instance(); QStylePainter p(this); int dist = 0; if (settings->isRectTabs()) { paintRectTabs(p); } else { dist = settings->tabsOverlappingLength(); paintRoundedTabs(p, dist); } // Global bottom frame border int h = tabRect(0).height() - 1; p.setPen(QApplication::palette().mid().color()); if (count() > 1) { if (currentIndex() == 0) { p.drawLine(tabRect(0).right() + 1 + dist, h, rect().right(), h); } else { p.drawLine(rect().left(), h, tabRect(currentIndex()).left(), h); p.drawLine(tabRect(currentIndex()).right() + 1 + dist, h, rect().right(), h); } } else { if (isLeftToRight()) { p.drawLine(tabRect(0).width() + dist, h, rect().right(), h); } else { p.drawLine(rect().left(), h, tabRect(0).left(), h); } }}
开发者ID:VengefulVeggie,项目名称:Miam-Player,代码行数:30,
示例23: tabAtvoid PlaylistTabBar::dragMoveEvent(QDragMoveEvent* e) { drag_hover_tab_ = tabAt(e->pos()); if (drag_hover_tab_ != -1) { e->setDropAction(Qt::CopyAction); e->accept(tabRect(drag_hover_tab_)); if (!drag_hover_timer_.isActive()) drag_hover_timer_.start(kDragHoverTimeout, this); } else { drag_hover_timer_.stop(); }}
开发者ID:jamie-gifford,项目名称:Clementine,代码行数:13,
示例24: tabRect// Handle hover events for mouse fade insvoid FancyTabBar::mouseMoveEvent(QMouseEvent *e){ if (!m_hoverRect.contains(e->pos())) { int newHover = -1; for (int i = 0; i < count(); ++i) { QRect area = tabRect(i); if (area.contains(e->pos())) { newHover = i; break; } } m_hoverControl.stop(); m_hoverIndex = newHover; update(m_hoverRect); m_hoverRect = QRect(); if (m_hoverIndex >= 0) { m_hoverRect = tabRect(m_hoverIndex); m_hoverControl.start(); } }}
开发者ID:nongxiaoming,项目名称:QGroundStation,代码行数:24,
示例25: tabRect// Handle hover events for mouse fade insvoid FancyTabBar::mouseMoveEvent(QMouseEvent *e){ int newHover = -1; for (int i = 0; i < count(); ++i) { QRect area = tabRect(i); if (area.contains(e->pos())) { newHover = i; break; } } if (newHover == m_hoverIndex) return; if (validIndex(m_hoverIndex)) m_tabs[m_hoverIndex]->fadeOut(); m_hoverIndex = newHover; if (validIndex(m_hoverIndex)) { m_tabs[m_hoverIndex]->fadeIn(); m_hoverRect = tabRect(m_hoverIndex); }}
开发者ID:jassuncao,项目名称:myparts,代码行数:24,
示例26: tabSizeHintvoid TabBar::showTabPreview(){ //delete previous tab preview delete m_previewPopup.data(); m_previewPopup.clear(); MainView *mv = qobject_cast<MainView *>(parent()); WebTab *indexedTab = mv->webTab(m_currentTabPreviewIndex); WebTab *currentTab = mv->webTab(currentIndex()); // check if view && currentView exist before using them :) if (!currentTab || !indexedTab) return; // no previews during load if (indexedTab->isPageLoading()) return; int w = tabSizeHint(m_currentTabPreviewIndex).width(); int h = w * ((0.0 + currentTab->height()) / currentTab->width()); m_previewPopup = new KPassivePopup(this); m_previewPopup.data()->setFrameShape(QFrame::StyledPanel); m_previewPopup.data()->setFrameShadow(QFrame::Plain); m_previewPopup.data()->setFixedSize(w, h); QLabel *l = new QLabel(); l->setPixmap( WebSnap::renderTabPreview(*indexedTab->page(), w, h) ); m_previewPopup.data()->setView(l); m_previewPopup.data()->layout()->setAlignment(Qt::AlignTop); m_previewPopup.data()->layout()->setMargin(0); QPoint pos(tabRect(m_currentTabPreviewIndex).x() , tabRect(m_currentTabPreviewIndex).y() + tabRect(m_currentTabPreviewIndex).height()); m_previewPopup.data()->show(mapToGlobal(pos));}
开发者ID:Fxrh,项目名称:rekonq,代码行数:37,
注:本文中的tabRect函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ tabText函数代码示例 C++ tabAt函数代码示例 |