Hi!
How can I change the "First day of Week in a QDateEdit?
Thanks
Hi!
How can I change the "First day of Week in a QDateEdit?
Thanks
Last edited by xgoan; 3rd April 2008 at 09:54. Reason: updated contents
Hi,
What do you need to do exactly?
wysotaQt allows you to use everything you want
--------------------------------------------------------------------------------
#if defined(Q_OS_UNIX) && defined(QT_DEBUG)
abort(); // trap; generates core dump
#else
exit(1); // goodbye cruel world
#endif
Is not possibel! ...
i rewrite a Widget to display all day from one Year now is a QTableWidget..
http://www.qt-apps.org/content/show....?content=76026
I want the weeks start on monday![]()
Isn't it locale dependent? BTW. Didn't you mean QCalendarWidget and not QDateEdit? The latter is just a spinbox. If you want to change settings of the calendar widget it user, you can use QDateTimeEdit::calendarWidget() and change its firstDayOfWeek property.
Here is a simple hack to change first day of week in QDateEdit using class inherited from QItemDelegate :
Qt Code:
QWidget *MyDateDelegate::createEditor ( QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index ) const { if ( index.column() == 1 || index.column() == 6 ) { de->setCalendarPopup ( true ); cw->setFirstDayOfWeek ( Qt::Monday ); return de; } }To copy to clipboard, switch view to plain text mode
It is not an example of good practice to remove const, but it works.
You must change the index of collumn(s) where QDateEdit will appear.
You should also implement setEditorData, setModelData, updateEditorGeometry, etc. according to your vision.
Last edited by Raycho Raykov; 23rd December 2013 at 09:22.
Bookmarks