本文整理汇总了C++中QPrinter::setNumCopies方法的典型用法代码示例。如果您正苦于以下问题:C++ QPrinter::setNumCopies方法的具体用法?C++ QPrinter::setNumCopies怎么用?C++ QPrinter::setNumCopies使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QPrinter
的用法示例。
在下文中一共展示了QPrinter::setNumCopies方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: cupsAvailable
bool FilePrinter::cupsAvailable()
{
#ifdef Q_WS_X11
// Ideally we would have access to the private Qt method
// QCUPSSupport::cupsAvailable() to do this as it is very complex routine.
// However, if CUPS is available then QPrinter::numCopies() will always return 1
// whereas if CUPS is not available it will return the real number of copies.
// This behaviour is guaranteed never to change, so we can use it as a reliable substitute.
QPrinter testPrinter;
testPrinter.setNumCopies( 2 );
return ( testPrinter.numCopies() == 1 );
#else
return false;
#endif
}
示例2: setNumCopies
void QPrinterProto::setNumCopies(int numCopies)
{
QPrinter *item = qscriptvalue_cast<QPrinter*>(thisObject());
if (item)
item->setNumCopies(numCopies);
}
示例3: setNumCopies
int Printer::setNumCopies(lua_State * L) // ( int numCopies )
{
QPrinter* lhs = ValueBinding<MyQPrinter>::check( L, 1 );
lhs->setNumCopies( Util::toInt( L, 2 ) );
return 0;
}