It's been a while since I used CopperSpice on Manjaro. Yes, it is not listed as supported, but it is Arch and it built pretty much without having to add anything. I'm porting XpnsQt from Qt to CopperSpice (since tax season fast approaches).
https://sourceforge.net/projects/xpnsqt/
Look at the screen shots and you can see the browse, report, and other dialogs all have the maximize button. The browse dialog when built on Manjaro using CopperSpice doesn't have the maximiz and doesn't even default size correctly.
https://www.logikalsolutions.com/wordpress/wp-content/uploads/2022/12/cs-dialog-bug-001.png
I do not know if this is related or part of a different recent issue.
Code: Select all
QXcbConnection: XCB error: 3 (BadWindow), sequence: 526, resource id: 11600547, major code: 40 (TranslateCoords), minor code: 0
Code: Select all
/****************************************************************************
* Originally created by Roland Hughes at Logikal Solutions.
* Project is being released under GPL2 license.
*
* At some point in the future either Logikal Solutions or Roland Hughes
* may elect to publish a book with this original source code in it. If
* the book is written it will be part of "The Minimum You Need to Know"
* book series.
****************************************************************************/
#include <QtGui>
#include <QtSql>
#include <QDebug>
#include <QTableView>
#include <QHeaderView>
#include <QVBoxLayout>
#include <QMessageBox>
#include <QString>
#include "browsewindow.h"
BrowseWindow::BrowseWindow( QWidget *parent, QString connectionName ) :
QDialog( parent )
{
m_editTranId = -1;
m_db = QSqlDatabase::database( connectionName );
if ( !m_db.isOpen() )
{
m_db.open();
}
//cs_setMinimumSize( QSize( 800,600 ) );
m_xpnsmodel = new QSqlTableModel( this, m_db );
m_xpnsmodel->setTable( "expenses" );
m_xpnsmodel->setSort( m_xpnsmodel->fieldIndex( "tran_dt" ), Qt::AscendingOrder );
m_xpnsmodel->setHeaderData( m_xpnsmodel->fieldIndex( "tran_id" ), Qt::Horizontal, tr( "tran_id" ) );
m_xpnsmodel->setHeaderData( m_xpnsmodel->fieldIndex( "tran_dt" ), Qt::Horizontal, tr( "tran_dt" ) );
m_xpnsmodel->setHeaderData( m_xpnsmodel->fieldIndex( "category" ), Qt::Horizontal, tr( "Category" ) );
m_xpnsmodel->setHeaderData( m_xpnsmodel->fieldIndex( "tax_ded" ), Qt::Horizontal, tr( "tax_ded" ) );
m_xpnsmodel->setHeaderData( m_xpnsmodel->fieldIndex( "payee" ), Qt::Horizontal,tr( "Payee" ) );
m_xpnsmodel->setHeaderData( m_xpnsmodel->fieldIndex( "amount" ), Qt::Horizontal,tr( "Amount" ) );
m_xpnsmodel->setHeaderData( m_xpnsmodel->fieldIndex( "comment" ), Qt::Horizontal,tr( "Comment" ) );
m_xpnsmodel->select();
m_xpnsview = new QTableView;
QFont font = m_xpnsview->font();
font.setPointSize( 14 );
m_xpnsview->setFont( font );
//m_xpnsview->setSizePolicy( QSizePolicy( QSizePolicy::Maximum, QSizePolicy::Maximum ) );
m_xpnsview->setModel( m_xpnsmodel );
m_xpnsview->setSelectionMode( QAbstractItemView::SingleSelection );
m_xpnsview->setSelectionBehavior( QAbstractItemView::SelectRows );
m_xpnsview->setColumnHidden( m_xpnsmodel->fieldIndex( "tran_id" ), true );
m_xpnsview->resizeColumnsToContents();
m_xpnsview->setEditTriggers( QAbstractItemView::NoEditTriggers );
QHeaderView *header = m_xpnsview->horizontalHeader();
header->setStretchLastSection( true );
editPushButton = new QPushButton( "Edit",this );
deletePushButton = new QPushButton( "Delete", this );
exitPushButton = new QPushButton( "Exit", this );
buttonWidget = new QWidget;
buttonGroupBox = new QGroupBox( tr( "Select row to edit or delete" ) );
QVBoxLayout *buttonBoxLayout = new QVBoxLayout;
buttonBoxLayout->addWidget( editPushButton );
buttonBoxLayout->addWidget( deletePushButton );
buttonBoxLayout->addWidget( exitPushButton );
buttonGroupBox->setLayout( buttonBoxLayout );
QHBoxLayout *mainLayout = new QHBoxLayout;
mainLayout->addWidget( m_xpnsview );
mainLayout->addWidget( buttonGroupBox );
setLayout( mainLayout );
setWindowTitle( tr( "Expense Records" ) );
connect( editPushButton, &QPushButton::clicked, this, &BrowseWindow::editXpns );
connect( deletePushButton, &QPushButton::clicked, this, &BrowseWindow::deleteXpns );
connect( exitPushButton, &QPushButton::clicked, this, &BrowseWindow::accept );
connect( m_xpnsview, &QTableView::doubleClicked, this, &BrowseWindow::doubleClicked );
}
BrowseWindow::~BrowseWindow()
{
//
// Delete in reverse order of add
//
if ( m_xpnsview )
{
delete m_xpnsview;
}
if ( m_xpnsmodel )
{
delete m_xpnsmodel;
}
// m_db is using a shared database connection
// just let QSqlDatabase handle it when it goes out of scope
//
} // end destructor
void BrowseWindow::editXpns()
{
QSqlRecord rec = m_xpnsmodel->record( m_xpnsview->currentIndex().row() );
m_editTranId = rec.field( "tran_id" ).value().toInt();
this->accept();
}
void BrowseWindow::deleteXpns()
{
m_xpnsmodel->removeRow( m_xpnsview->currentIndex().row() );
}
void BrowseWindow::doubleClicked( const QModelIndex &index )
{
Q_UNUSED( index )
editXpns();
}
https://www.logikalsolutions.com/wordpress/wp-content/uploads/2022/12/cs-dialog-bug-002.png
It's also disabled resize.
Choosing "unMaximize" does nothing.