当前位置: 首页>>代码示例>>C++>>正文


C++ QScrollView::setFrameShape方法代码示例

本文整理汇总了C++中QScrollView::setFrameShape方法的典型用法代码示例。如果您正苦于以下问题:C++ QScrollView::setFrameShape方法的具体用法?C++ QScrollView::setFrameShape怎么用?C++ QScrollView::setFrameShape使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在QScrollView的用法示例。


在下文中一共展示了QScrollView::setFrameShape方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: pageName

HelixConfigDialogBase::HelixConfigDialogBase( HelixEngine *engine, amaroK::PluginConfig *config, QWidget *p )
     : QTabWidget( p )
     , m_core(0)
     , m_plugin(0)
     , m_codec(0)
     , m_device(0)
     , m_engine( engine )
{
    int row = 0;
    QString currentPage;
    QWidget *parent = 0;
    QGridLayout *grid = 0;
    QScrollView *sv = 0;

    QString pageName( i18n("Main") );

    addTab( sv = new QScrollView, pageName );
    parent = new QWidget( sv->viewport() );

    sv->setResizePolicy( QScrollView::AutoOneFit );
    sv->setHScrollBarMode( QScrollView::AlwaysOff );
    sv->setFrameShape( QFrame::NoFrame );
    sv->addChild( parent );

    grid = new QGridLayout( parent, /*rows*/20, /*cols*/2, /*margin*/10, /*spacing*/10 );
    grid->setColStretch( 0, 1 );
    grid->setColStretch( 1, 1 );

    if( sv )
       sv->setMinimumWidth( grid->sizeHint().width() + 20 );

    engine->m_coredir = HelixConfig::coreDirectory();
    m_core = new HelixConfigEntry( parent, engine->m_coredir, 
                                   config, row, 
                                   i18n("Helix/Realplay core directory"), 
                                   HelixConfig::coreDirectory().utf8(),
                                   i18n("This is the directory where clntcore.so is located"));
    ++row;
    engine->m_pluginsdir = HelixConfig::pluginDirectory();
    m_plugin = new HelixConfigEntry( parent, engine->m_pluginsdir, 
                                     config, row, 
                                     i18n("Helix/Realplay plugins directory"), 
                                     HelixConfig::pluginDirectory().utf8(),
                                     i18n("This is the directory where, for example, vorbisrend.so is located"));
    ++row;
    engine->m_codecsdir = HelixConfig::codecsDirectory();
    m_codec = new HelixConfigEntry( parent, engine->m_codecsdir, 
                                     config, row, 
                                     i18n("Helix/Realplay codecs directory"), 
                                     HelixConfig::codecsDirectory().utf8(),
                                     i18n("This is the directory where, for example, cvt1.so is located"));
    ++row;
    grid->addMultiCellWidget( new KSeparator( KSeparator::Horizontal, parent ), row, row, 0, 1 );

    ++row;
    m_device = new HelixSoundDevice( parent, config, row, engine );

    // lets find the logo if we can
    QPixmap *pm = 0;
    QString logo = HelixConfig::coreDirectory();
    if (logo.isEmpty()) 
       logo = HELIX_LIBS "/common";

    logo.append("/../share/");

    QString tmp = logo;
    tmp.append("hxplay/logo.png");
    if (QFileInfo(tmp).exists())
    {
       logo = tmp;
       pm = new QPixmap(logo);
    }
    else
    {
       tmp = logo;
       tmp.append("realplay/logo.png");
       if (QFileInfo(tmp).exists())
       {
          logo = tmp;
          pm = new QPixmap(logo);
       }
    }

    if (pm)
    {
       QLabel *l = new QLabel(parent);
       l->setPixmap(*pm);
       grid->addMultiCellWidget( l, 20, 20, 1, 1, Qt::AlignRight );
    }

    entries.setAutoDelete( true );

    pageName = i18n("Plugins");

    addTab( sv = new QScrollView, pageName );
    parent = new QWidget( sv->viewport() );

    sv->setResizePolicy( QScrollView::AutoOneFit );
    sv->addChild( parent );

//.........这里部分代码省略.........
开发者ID:tmarques,项目名称:waheela,代码行数:101,代码来源:helix-configdialog.cpp


注:本文中的QScrollView::setFrameShape方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。